summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWaylan Limberg <waylan.limberg@icloud.com>2022-07-15 10:08:11 -0400
committerGitHub <noreply@github.com>2022-07-15 10:08:11 -0400
commita884a99173e44b76d28ffb34f27995aa70e5b938 (patch)
treec37c6cce477ccd8b62233d473ef5a82d7c84ae2d
parentc0f6e5a31ea8e7fe98910a0523144c2a96fa9bf1 (diff)
downloadpython-markdown-a884a99173e44b76d28ffb34f27995aa70e5b938.tar.gz
Bump version to 3.43.4
Cleaned up the release notes.
-rw-r--r--docs/change_log/index.md2
-rw-r--r--docs/change_log/release-3.4.md80
-rw-r--r--docs/extensions/code_hilite.md4
-rw-r--r--markdown/__meta__.py2
4 files changed, 47 insertions, 41 deletions
diff --git a/docs/change_log/index.md b/docs/change_log/index.md
index fc78087..87d57eb 100644
--- a/docs/change_log/index.md
+++ b/docs/change_log/index.md
@@ -3,7 +3,7 @@ title: Change Log
Python-Markdown Change Log
=========================
-Under development: version 3.4.0 ([Notes](release-3.4.md)).
+July 15, 2022: version 3.4 ([Notes](release-3.4.md)).
May 5, 2022: version 3.3.7 (a bug-fix release).
diff --git a/docs/change_log/release-3.4.md b/docs/change_log/release-3.4.md
index 9db6707..bfa8075 100644
--- a/docs/change_log/release-3.4.md
+++ b/docs/change_log/release-3.4.md
@@ -7,18 +7,19 @@ PyPy3.
## Backwards-incompatible changes
-### The `table` extension now uses a `style` attribute instead of `align` attribute for alignment.
+### The `tables` extension now uses a `style` attribute instead of an `align` attribute for alignment.
-The [HTML4 spec][spec4] specifically
-deprecates the use of the `align` attribute and it does not appear at all in the
-[HTML5 spec][spec5]. Therefore, by default, the [table] extension will now use the `style`
-attribute (setting just the `text-align` property) in `td` and `th` blocks.
+The [HTML4 spec][spec4] specifically deprecates the use of the `align` attribute
+and it does not appear at all in the [HTML5 spec][spec5]. Therefore, by default,
+the [tables] extension will now use the `style` attribute (setting just the
+`text-align` property) in `td` and `th` blocks.
[spec4]: https://www.w3.org/TR/html4/present/graphics.html#h-15.1.2
[spec5]: https://www.w3.org/TR/html53/tabular-data.html#attributes-common-to-td-and-th-elements
+[tables]: ../extensions/tables.md
-The former behavior is available by setting the setting `use_align_attribute` configuration
-option to `True` when adding the extension.
+The former behavior is available by setting the `use_align_attribute`
+configuration option to `True` when enabling the extension.
For example, to configure the old `align` behavior:
@@ -28,12 +29,11 @@ from markdown.extensions.tables import TableExtension
markdown.markdown(src, extensions=[TableExtension(use_align_attribute=True)])
```
-In addition, tests were moved to the modern test environment.
-
### Backslash unescaping moved to Treeprocessor (#1131).
-Unescaping backslash escapes has been moved to a Treeprocessor. However, it is
-recognized that various third-party extensions may be calling the old class at
+Unescaping backslash escapes has been moved to a Treeprocessor, which enables
+proper HTML escaping during serialization. However, it is recognized that
+various third-party extensions may be calling the old class at
`postprocessors.UnescapePostprocessor`. Therefore, the old class remains in the
code base, but has been deprecated and will be removed in a future release. The
new class `treeprocessors.UnescapeTreeprocessor` should be used instead.
@@ -43,7 +43,7 @@ new class `treeprocessors.UnescapeTreeprocessor` should be used instead.
Various objects were deprecated in version 3.0 and began raising deprecation
warnings (see the [version 3.0 release notes] for details). Any of those objects
which remained in version 3.3 have been removed from the code base in version 3.4
-and will now raise errors. A summary of the objects are provided below.
+and will now raise errors. The relevant objects are listed below.
[version 3.0 release notes]: release-3.0.md
@@ -56,7 +56,7 @@ and will now raise errors. A summary of the objects are provided below.
| `markdown.util.text_type` | `str` |
| `markdown.util.int2str` | `chr` |
| `markdown.util.iterrange` | `range` |
-| `markdown.util.isBlockLevel` | `markdown.Markdown.is_block_level` |
+| `markdown.util.isBlockLevel` | `markdown.Markdown().is_block_level`|
| `markdown.util.Processor().markdown` | `markdown.util.Processor().md` |
| `markdown.util.Registry().__setitem__` | `markdown.util.Registry().register` |
| `markdown.util.Registry().__delitem__` |`markdown.util.Registry().deregister`|
@@ -70,38 +70,44 @@ valid parameter and will raise an error if provided.
The following new features have been included in the 3.4 release:
-* Use `style` attribute in tables for alignment instead of `align` for better CSS
- inter-operation. The old behavior is available by setting `use_align_attribute=True` when
- adding the extension.
-* Some new configuration options have been added to the [footnotes](../extensions/footnotes.md)
- extension (#1218):
+* Some new configuration options have been added to the
+ [footnotes](../extensions/footnotes.md) extension (#1218):
+
+ * Small refactor of the `BACKLINK_TITLE` option; The use of `format()`
+ instead of "old" `%d` formatter allows one to specify text without the
+ need to have the number of the footnote in it (like footnotes on
+ Wikipedia for example). The modification is backward compatible so no
+ configuration change is required.
+
+ * Addition of a new option `SUPERSCRIPT_TEXT` that allows one to specify a
+ custom placeholder for the footnote itself in the text.
+ Ex: `[{}]` will give `<sup>[1]</sup>`, `({})` will give `<sup>(1)</sup>`,
+ or by default, the current behavior: `<sup>1</sup>`.
- * Small refactor of the `BACKLINK_TITLE` option; The use of `format()` instead
- of "old" `%d` formatter allows to specify text without the need to have the
- number of the footnote in it (like footnotes on Wikipedia for example).
- The modification is backward compatible so no configuration change is required.
+* The [Table of Contents](../extensions/toc.md) extension now accepts a
+ `toc_class` parameter which can be used to set the CSS class(es) on the
+ `<div>` that contains the Table of Contents (#1224).
- * Addition of a new option `SUPERSCRIPT_TEXT` that allows to specify a custom
- placeholder for the footnote itself in the text.
- Ex: `[{}]` will give <sup>[1]</sup>, `({})` will give <sup>(1)</sup>,
- or just by default, the current behavior: <sup>1</sup>.
+* The CodeHilite extension now supports a `pygments_formatter` option that can
+ be set to a custom formatter class (#1187).
-* The [Table of Contents](../extensions/toc.md) extension now accepts a `toc_class`
- parameter which can be used to set the CSS class(es) on the `<div>` that contains the
- Table of Contents (#1224).
+ - If `pygments_formatter` is set to a string (ex: `'html'`), Pygments'
+ default formatter by that name is used.
+ - If `pygments_formatter` is set to a formatter class (or any callable
+ which returns a formatter instance), then an instance of that class is
+ used.
-* The CodeHilite extension now supports a `pygments_formatter` option that can be set to
- use a custom formatter class with Pygments (#1187). Additionally, the specified
- Pygments formatter is passed an extra option `lang_str` to denote the language of
- the code block (#1258).
- - If set to a string like `'html'`, we get the default formatter by that name.
- - If set to a class (or any callable), it is called with all the options to get a
- formatter instance.
+ The formatter class is now passed an additional option, `lang_str`, to
+ denote the language of the code block (#1258). While Pygments' built-in
+ formatters will ignore the option, a custom formatter assigned to the
+ `pygments_formatter` option can make use of the `lang_str` to include the
+ code block's language in the output.
## Bug fixes
The following bug fixes are included in the 3.4 release:
* Extension entry-points are only loaded if needed (#1216).
-* Added additional checks to the `<pre><code>` handling of `PrettifyTreeprocessor` (#1261, #1263).
+* Added additional checks to the `<pre><code>` handling of
+ `PrettifyTreeprocessor` (#1261, #1263).
diff --git a/docs/extensions/code_hilite.md b/docs/extensions/code_hilite.md
index 5179d0a..19b9d52 100644
--- a/docs/extensions/code_hilite.md
+++ b/docs/extensions/code_hilite.md
@@ -232,7 +232,7 @@ The following options are provided to configure the output:
The prefix prepended to the language class assigned to the HTML `<code>` tag. Default: `language-`.
* **`pygments_formatter`**{ #pygments_formatter }:
- This option can be used to change the Pygments formatter used for highlighting the code blocks. By default, this
+ This option can be used to change the Pygments formatter used for highlighting code blocks. By default, this
is set to the string `'html'`, which means it'll use the default `HtmlFormatter` provided by Pygments.
This can be set to a string representing any of the other default formatters, or set to a formatter class (or
@@ -290,7 +290,7 @@ markdown.markdown(
)
```
-The formatter above will output the following HTML structure for the code block:
+The formatter above will output the following HTML structure for a code block:
```html
<div class="codehilite">
diff --git a/markdown/__meta__.py b/markdown/__meta__.py
index 92dd5cf..1c6c441 100644
--- a/markdown/__meta__.py
+++ b/markdown/__meta__.py
@@ -26,7 +26,7 @@ License: BSD (see LICENSE.md for details).
# (1, 2, 0, 'beta', 2) => "1.2b2"
# (1, 2, 0, 'rc', 4) => "1.2rc4"
# (1, 2, 0, 'final', 0) => "1.2"
-__version_info__ = (3, 4, 0, 'dev', 0)
+__version_info__ = (3, 4, 0, 'final', 0)
def _get_version(version_info):