version 0.3 (2026-10-15)
========================

* Support python 3.10 to 3.14, django-cms 3.11 to 5.1 and django 4.2 to 6.1;
  drop support for python 2 and older django/django-cms versions
* Replace setup.py with pyproject.toml
* Postprocessors now rely on beautifulsoup4 (optional extra "postprocessors"),
  instead of the python2-only BeautifulSoup 3
* Fix the initial migration for django>=2 (missing on_delete), and add
  migration 0004 (related_name of the plugin pointer, as expected by modern
  django-cms; no DB schema change)
* Stop using django and docutils APIs which are removed or deprecated
* Add a pytest test suite and a tox configuration for all supported versions
* Make the demo django-cms project of tests/manage.py work again, with a
  temporary sqlite database and auto-created demo pages and superuser
* Document syntax highlighting of code via the standard docutils "code"
  directive/role, add the optional "highlighting" extra (pygments), bundle
  a matching stylesheet (static file "cmsplugin_rst/pygments.css"), and add
  "python -m cmsplugin_rst.highlighting [STYLE [long|short]]" to generate
  stylesheets for other pygments styles (docutils uses long token class names)
* Remove the unreachable fallback of restructuredtext() for a missing
  docutils, which would have returned the unescaped source as "safe" html
  (docutils is a mandatory dependency anyway)
* CMSPLUGIN_RST_SETTINGS_OVERRIDES is now read at each rendering instead of
  once at import time, so that it can be changed at runtime (eg. with
  override_settings() in tests)
* A header_level of 0 (allowed by the plugin form) now means "default
  level", instead of producing invalid <h0> tags
* CMSPLUGIN_RST_CONTENT_PREFIX/SUFFIX are now separated from the content by
  blank lines, so that they no longer merge with its first/last paragraph,
  nor break when they end with explicit markup (substitution definitions,
  targets...)
* SECURITY: links and images whose URL scheme is not allowed (eg.
  "javascript:" or "data:") are now neutralized, since they allowed script
  injection by page editors despite the disabling of the "raw" directive;
  allowed schemes can be set with the new CMSPLUGIN_RST_ALLOWED_URL_SCHEMES
  setting. docutils>=0.18.1 is now required.
* french_insecable() no longer alters the content of code-like html elements
  (pre, code, tt, kbd, samp, var, script, style, textarea), which broke code
  copied from french pages
* French typography rules now depend on the language of the plugin itself,
  instead of the language of the request, so that they are applied (only)
  to french content when django-cms displays fallback-language content
* Remove a debug print() of the "cmspage" role, which polluted the server
  output on each rendering of a duplicated reverse ID
* The "cmspage" role now only looks up pages of the current site, since
  reverse IDs are only unique per site; on multi-site installations, links
  to reverse IDs used on several sites always failed as "not unique"
* The "cmspage" role no longer links to unpublished pages: on django-cms<4,
  unpublished or expired public pages are ignored, and on django-cms>=4
  pages without visible content (eg. draft-only pages with djangocms-
  versioning) are ignored too, instead of producing links which 404 for
  visitors
* Generated pygments stylesheets no longer apply the base text color of a
  style to all <code> elements (which made inline code unreadable with dark
  styles), and apply the style background to highlighted inline code too
* Stylesheets generated for short token names no longer contain global rules
  (for all <pre> elements, and line numbers tables) from Pygments, which
  restyled the whole site
* Stylesheets generated for long token names no longer let the rules of
  unrelated tokens apply to tokens which have a superset of their classes
  (eg. ".name.class" made "name variable class" tokens bold, ".error" gave
  "generic error" tokens a border), nor let non-standard tokens of some
  styles (eg. "Comment.PreProc" of gruvbox) override standard tokens with
  the same classes (eg. "Comment.Preproc"); the bundled stylesheet is
  regenerated accordingly
* Measure test coverage (pytest-cov, 95% minimum), with tests for the
  previously untested code paths (postprocessors chaining and absence of
  beautifulsoup4, legacy "class" option of the "cmspage" role, stylesheet
  generation for styles without background, command line of
  cmsplugin_rst.highlighting), and remove dead code
* Fix "cmspage" docutils role for django-cms>=4: Page.publisher_is_draft was
  removed upstream (draft/publish is now versioned PageContent, not separate
  Page rows), which made the role crash with a FieldError on cms4+. The
  publisher_is_draft filter is now only applied when the field still exists,
  keeping the role working unchanged on django-cms<4.
* Add high-level render_rich_text() utility, usable outside of the cms plugin,
  with optional "header_level" and "report_level" arguments
* Add french_insecable() utility, automatically applied to the html output
  when the page language is french (thin non-breaking spaces before double
  punctuation signs)
* Stop calling prettify() on postprocessed html, since it broke tag spacing
* Add migration 0003 (field help texts, on_delete of plugin pointer)
* Python 3 tweaks
* Reduce the height of the RST textarea in the plugin form


version 0.2
===========

* Add "cmspage" docutils role to get the URL of a djangocms page
* Add "header_level" field in model, to override initial 
  header level for a specific instance
* add default settings for docutils renderer
* add auto replacements for static/media urls, and nbsp/br html elements
* add configuration variables CMSPLUGIN_RST_WRITER_NAME, CMSPLUGIN_RST_CONTENT_PREFIX,
  CMSPLUGIN_RST_CONTENT_SUFFIX, CMSPLUGIN_RST_SETTINGS_OVERRIDES
* fix the case of lone titles/subtitles being removed from output
* switch from South to Django migrations
* add a test project with its sqlite db
* update cms plugin for django 1.8 and djangocms 3.2


version 0.1.1
=============

* support for beautifulsoup postprocessors (CMSPLUGIN_RST_POSTPROCESSORS)
* support for django 1.2 and djangocms 2.1, using South migrations
* initial plugin, with name and RST body