Skip to content

Commit a884a99

Browse files
authoredJul 15, 2022
Bump version to 3.4
Cleaned up the release notes.
1 parent c0f6e5a commit a884a99

File tree

4 files changed

+47
-41
lines changed

4 files changed

+47
-41
lines changed
 

‎docs/change_log/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Change Log
33
Python-Markdown Change Log
44
=========================
55

6-
Under development: version 3.4.0 ([Notes](release-3.4.md)).
6+
July 15, 2022: version 3.4 ([Notes](release-3.4.md)).
77

88
May 5, 2022: version 3.3.7 (a bug-fix release).
99

‎docs/change_log/release-3.4.md

+43-37
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,19 @@ PyPy3.
77

88
## Backwards-incompatible changes
99

10-
### The `table` extension now uses a `style` attribute instead of `align` attribute for alignment.
10+
### The `tables` extension now uses a `style` attribute instead of an `align` attribute for alignment.
1111

12-
The [HTML4 spec][spec4] specifically
13-
deprecates the use of the `align` attribute and it does not appear at all in the
14-
[HTML5 spec][spec5]. Therefore, by default, the [table] extension will now use the `style`
15-
attribute (setting just the `text-align` property) in `td` and `th` blocks.
12+
The [HTML4 spec][spec4] specifically deprecates the use of the `align` attribute
13+
and it does not appear at all in the [HTML5 spec][spec5]. Therefore, by default,
14+
the [tables] extension will now use the `style` attribute (setting just the
15+
`text-align` property) in `td` and `th` blocks.
1616

1717
[spec4]: https://www.w3.org/TR/html4/present/graphics.html#h-15.1.2
1818
[spec5]: https://www.w3.org/TR/html53/tabular-data.html#attributes-common-to-td-and-th-elements
19+
[tables]: ../extensions/tables.md
1920

20-
The former behavior is available by setting the setting `use_align_attribute` configuration
21-
option to `True` when adding the extension.
21+
The former behavior is available by setting the `use_align_attribute`
22+
configuration option to `True` when enabling the extension.
2223

2324
For example, to configure the old `align` behavior:
2425

@@ -28,12 +29,11 @@ from markdown.extensions.tables import TableExtension
2829
markdown.markdown(src, extensions=[TableExtension(use_align_attribute=True)])
2930
```
3031

31-
In addition, tests were moved to the modern test environment.
32-
3332
### Backslash unescaping moved to Treeprocessor (#1131).
3433

35-
Unescaping backslash escapes has been moved to a Treeprocessor. However, it is
36-
recognized that various third-party extensions may be calling the old class at
34+
Unescaping backslash escapes has been moved to a Treeprocessor, which enables
35+
proper HTML escaping during serialization. However, it is recognized that
36+
various third-party extensions may be calling the old class at
3737
`postprocessors.UnescapePostprocessor`. Therefore, the old class remains in the
3838
code base, but has been deprecated and will be removed in a future release. The
3939
new class `treeprocessors.UnescapeTreeprocessor` should be used instead.
@@ -43,7 +43,7 @@ new class `treeprocessors.UnescapeTreeprocessor` should be used instead.
4343
Various objects were deprecated in version 3.0 and began raising deprecation
4444
warnings (see the [version 3.0 release notes] for details). Any of those objects
4545
which remained in version 3.3 have been removed from the code base in version 3.4
46-
and will now raise errors. A summary of the objects are provided below.
46+
and will now raise errors. The relevant objects are listed below.
4747

4848
[version 3.0 release notes]: release-3.0.md
4949

@@ -56,7 +56,7 @@ and will now raise errors. A summary of the objects are provided below.
5656
| `markdown.util.text_type` | `str` |
5757
| `markdown.util.int2str` | `chr` |
5858
| `markdown.util.iterrange` | `range` |
59-
| `markdown.util.isBlockLevel` | `markdown.Markdown.is_block_level` |
59+
| `markdown.util.isBlockLevel` | `markdown.Markdown().is_block_level`|
6060
| `markdown.util.Processor().markdown` | `markdown.util.Processor().md` |
6161
| `markdown.util.Registry().__setitem__` | `markdown.util.Registry().register` |
6262
| `markdown.util.Registry().__delitem__` |`markdown.util.Registry().deregister`|
@@ -70,38 +70,44 @@ valid parameter and will raise an error if provided.
7070

7171
The following new features have been included in the 3.4 release:
7272

73-
* Use `style` attribute in tables for alignment instead of `align` for better CSS
74-
inter-operation. The old behavior is available by setting `use_align_attribute=True` when
75-
adding the extension.
7673

77-
* Some new configuration options have been added to the [footnotes](../extensions/footnotes.md)
78-
extension (#1218):
74+
* Some new configuration options have been added to the
75+
[footnotes](../extensions/footnotes.md) extension (#1218):
76+
77+
* Small refactor of the `BACKLINK_TITLE` option; The use of `format()`
78+
instead of "old" `%d` formatter allows one to specify text without the
79+
need to have the number of the footnote in it (like footnotes on
80+
Wikipedia for example). The modification is backward compatible so no
81+
configuration change is required.
82+
83+
* Addition of a new option `SUPERSCRIPT_TEXT` that allows one to specify a
84+
custom placeholder for the footnote itself in the text.
85+
Ex: `[{}]` will give `<sup>[1]</sup>`, `({})` will give `<sup>(1)</sup>`,
86+
or by default, the current behavior: `<sup>1</sup>`.
7987

80-
* Small refactor of the `BACKLINK_TITLE` option; The use of `format()` instead
81-
of "old" `%d` formatter allows to specify text without the need to have the
82-
number of the footnote in it (like footnotes on Wikipedia for example).
83-
The modification is backward compatible so no configuration change is required.
88+
* The [Table of Contents](../extensions/toc.md) extension now accepts a
89+
`toc_class` parameter which can be used to set the CSS class(es) on the
90+
`<div>` that contains the Table of Contents (#1224).
8491

85-
* Addition of a new option `SUPERSCRIPT_TEXT` that allows to specify a custom
86-
placeholder for the footnote itself in the text.
87-
Ex: `[{}]` will give <sup>[1]</sup>, `({})` will give <sup>(1)</sup>,
88-
or just by default, the current behavior: <sup>1</sup>.
92+
* The CodeHilite extension now supports a `pygments_formatter` option that can
93+
be set to a custom formatter class (#1187).
8994

90-
* The [Table of Contents](../extensions/toc.md) extension now accepts a `toc_class`
91-
parameter which can be used to set the CSS class(es) on the `<div>` that contains the
92-
Table of Contents (#1224).
95+
- If `pygments_formatter` is set to a string (ex: `'html'`), Pygments'
96+
default formatter by that name is used.
97+
- If `pygments_formatter` is set to a formatter class (or any callable
98+
which returns a formatter instance), then an instance of that class is
99+
used.
93100

94-
* The CodeHilite extension now supports a `pygments_formatter` option that can be set to
95-
use a custom formatter class with Pygments (#1187). Additionally, the specified
96-
Pygments formatter is passed an extra option `lang_str` to denote the language of
97-
the code block (#1258).
98-
- If set to a string like `'html'`, we get the default formatter by that name.
99-
- If set to a class (or any callable), it is called with all the options to get a
100-
formatter instance.
101+
The formatter class is now passed an additional option, `lang_str`, to
102+
denote the language of the code block (#1258). While Pygments' built-in
103+
formatters will ignore the option, a custom formatter assigned to the
104+
`pygments_formatter` option can make use of the `lang_str` to include the
105+
code block's language in the output.
101106

102107
## Bug fixes
103108

104109
The following bug fixes are included in the 3.4 release:
105110

106111
* Extension entry-points are only loaded if needed (#1216).
107-
* Added additional checks to the `<pre><code>` handling of `PrettifyTreeprocessor` (#1261, #1263).
112+
* Added additional checks to the `<pre><code>` handling of
113+
`PrettifyTreeprocessor` (#1261, #1263).

‎docs/extensions/code_hilite.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ The following options are provided to configure the output:
232232
The prefix prepended to the language class assigned to the HTML `<code>` tag. Default: `language-`.
233233

234234
* **`pygments_formatter`**{ #pygments_formatter }:
235-
This option can be used to change the Pygments formatter used for highlighting the code blocks. By default, this
235+
This option can be used to change the Pygments formatter used for highlighting code blocks. By default, this
236236
is set to the string `'html'`, which means it'll use the default `HtmlFormatter` provided by Pygments.
237237

238238
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(
290290
)
291291
```
292292

293-
The formatter above will output the following HTML structure for the code block:
293+
The formatter above will output the following HTML structure for a code block:
294294

295295
```html
296296
<div class="codehilite">

‎markdown/__meta__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
# (1, 2, 0, 'beta', 2) => "1.2b2"
2727
# (1, 2, 0, 'rc', 4) => "1.2rc4"
2828
# (1, 2, 0, 'final', 0) => "1.2"
29-
__version_info__ = (3, 4, 0, 'dev', 0)
29+
__version_info__ = (3, 4, 0, 'final', 0)
3030

3131

3232
def _get_version(version_info):

0 commit comments

Comments
 (0)
Failed to load comments.