aboutsummaryrefslogtreecommitdiff
path: root/docs/change_log/release-3.1.md
blob: b05cd230db3e96d56e21954755b1199be06ba9db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
title: Release Notes for v3.1

# Python-Markdown 3.1 Release Notes

Python-Markdown version 3.1 supports Python versions 2.7, 3.5, 3.6, 3.7,
PyPy and PyPy3.

## Backwards-incompatible changes

### `markdown.version` and `markdown.version_info` deprecated

Historically, version numbers were acquired via the attributes
`markdown.version` and `markdown.version_info`. As of 3.0, a more standardized
approach is being followed and versions are acquired via the
`markdown.__version__` and `markdown.__version_info__` attributes.  As of 3.1
the legacy attributes will raise a `DeprecationWarning` if they are accessed. In
a future release the legacy attributes will be removed.

## New features

The following new features have been included in the release:

* A [Contributing Guide](../contributing.md) has been added (#732).

* A new configuration option to set the footnote separator has been added. Also,
  the `rel` and `rev` attributes have been removed from footnotes as they are
  not valid in HTML5. The `refs` and `backrefs` classes already exist and
  serve the same purpose (#723).

* A new option for `toc_depth` to set not only the bottom section level,
  but also the top section level. A string consisting of two digits
  separated by a hyphen in between (`"2-5"`), defines the top (`t`) and the
  bottom (`b`) (`<ht>..<hb>`). A single integer still defines the bottom
  section level (`<h1>..<hb>`) only. (#787).

## Bug fixes

The following bug fixes are included in the 3.1 release:

* Update CLI to support PyYAML 5.1.
* Overlapping raw HTML matches no longer leave placeholders behind (#458).
* Emphasis patterns now recognize newline characters as whitespace (#783).
* Version format had been updated to be PEP 440 compliant (#736).
* Block level elements are defined per instance, not as class attributes
  (#731).
* Double escaping of block code has been eliminated (#725).
* Problems with newlines in references has been fixed (#742).
* Escaped `#` are now handled in header syntax (#762).