Skip to content

Commit 5d1b081

Browse files
authored
🚀 RELEASE: v0.16.0 (#457)
1 parent 87d6af7 commit 5d1b081

File tree

2 files changed

+145
-1
lines changed

2 files changed

+145
-1
lines changed

CHANGELOG.md

Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,149 @@
11
# Changelog
22

3+
## 0.16.0 - 2021-12-06
4+
5+
This release contains a number of exciting improvements:
6+
7+
### Upgrade of Markdown parser
8+
9+
`markdown-it-py` has been upgraded to [v2.0.0](https://github.com/executablebooks/markdown-it-py/releases/tag/v2.0.0).
10+
This upgrade brings full compliance with the [CommonMark v0.30 specification](https://spec.commonmark.org/0.30/).
11+
12+
Additionally, `mdit-py-plugins` has been upgraded to [v0.3.0](https://github.com/executablebooks/mdit-py-plugins/releases/tag/v0.3.0).
13+
This improves the parsing of the MyST target syntax, to allow for spaces and additional special characters in the target name,
14+
for example this is now valid:
15+
16+
```md
17+
(a bc |@<>*./_-+:)=
18+
19+
# Header
20+
```
21+
22+
Also MyST role syntax now supports unlimited length in the role name and new lines in the content.
23+
For example, this is now valid:
24+
25+
```md
26+
{abc}`xy
27+
new line`
28+
```
29+
30+
### Improvements for Docutils-only use
31+
32+
MyST now allows for Docutils-only use (outside of Sphinx), that allows for MyST configuration options to be set via the `docutils.conf` file, or on the command line.
33+
34+
On installing MyST-Parser, the following CLI-commands are made available:
35+
36+
- `myst-docutils-html`: converts MyST to HTML
37+
- `myst-docutils-html5`: converts MyST to HTML5
38+
- `myst-docutils-latex`: converts MyST to LaTeX
39+
- `myst-docutils-xml`: converts MyST to docutils-native XML
40+
- `myst-docutils-pseudoxml`: converts MyST to pseudo-XML (to visualise the AST structure)
41+
42+
You can also install the [myst-docutils](https://pypi.org/project/myst-docutils/) package from `pip`,
43+
which includes no direct install requirements on docutils or sphinx.
44+
45+
See [MyST with Docutils](docs/docutils.md) for more information.
46+
47+
Thanks to help from [@cpitclaudel](https://github.com/cpitclaudel)!
48+
49+
### Include MyST files in RST files
50+
51+
With `docutils>=0.17`, the `include` directive has a `parser` option.
52+
This can be used with myst-parser to include MyST files in RST files.
53+
54+
```md
55+
Parse using the docutils only parser:
56+
57+
.. include:: include.md
58+
:parser: myst_parser.docutils_
59+
60+
Parse using the sphinx parser:
61+
62+
.. include:: include.md
63+
:parser: myst_parser.sphinx_
64+
```
65+
66+
### Addition of the `fieldlist` syntax extension
67+
68+
Field lists are mappings from field names to field bodies, based on the [reStructureText syntax](https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#field-lists):
69+
70+
```rst
71+
:name only:
72+
:name: body
73+
:name:
74+
Multiple
75+
76+
Paragraphs
77+
```
78+
79+
This should eventually allow for MyST Markdown docstrings! (see <https://github.com/executablebooks/MyST-Parser/issues/228>)
80+
81+
See [Field Lists syntax](docs/syntax/optional.md#field-lists) for more information.
82+
83+
### Improvements to table rendering
84+
85+
Tables with no body are now allowed, for example:
86+
87+
```md
88+
| abc | def |
89+
| --- | --- |
90+
```
91+
92+
Also cell alignment HTML classes have now been changed to: `text-left`, `text-center`, or `text-right`, for example:
93+
94+
```md
95+
| left | center | right |
96+
| :--- | :----: | ----: |
97+
| a | b | c |
98+
```
99+
100+
is converted to:
101+
102+
```html
103+
<table class="colwidths-auto">
104+
<thead>
105+
<tr>
106+
<th class="text-left head"><p>left</p></th>
107+
<th class="text-center head"><p>center</p></th>
108+
<th class="text-right head"><p>right</p></th>
109+
</tr>
110+
</thead>
111+
<tbody>
112+
<tr>
113+
<td class="text-left"><p>a</p></td>
114+
<td class="text-center"><p>b</p></td>
115+
<td class="text-right"><p>c</p></td>
116+
</tr>
117+
</tbody>
118+
</table>
119+
```
120+
121+
These classes should be supported by most sphinx HTML themes.
122+
123+
See [Tables syntax](docs/syntax/syntax.md#tables) for more information.
124+
125+
### Pull Requests
126+
127+
- 🐛 FIX: Add mandatory attributes on `enumerated_list` by @cpitclaudel in [#418](https://github.com/executablebooks/MyST-Parser/pull/418)
128+
- 📚 DOCS: Add reference to MySTyc in landing page by @astrojuanlu in [#413](https://github.com/executablebooks/MyST-Parser/pull/413)
129+
- ⬆️ UPGRADE: markdown-it-py v2, mdit-py-plugins v0.3 by @chrisjsewell in [#449](https://github.com/executablebooks/MyST-Parser/pull/449)
130+
- 👌 IMPROVE: Table rendering by @chrisjsewell in [#450](https://github.com/executablebooks/MyST-Parser/pull/450)
131+
- 🐛 FIX: Ensure parent files are re-built if `include` file changes by @chrisjsewell in [#451](https://github.com/executablebooks/MyST-Parser/pull/451)
132+
- 🐛 FIX: Convert empty directive option to `None` by @chrisjsewell in [#452](https://github.com/executablebooks/MyST-Parser/pull/452)
133+
- 👌 IMPROVE: Add `\\` for hard-breaks in latex by @chrisjsewell in [#453](https://github.com/executablebooks/MyST-Parser/pull/453)
134+
- 🔧 MAINTAIN: Remove empty "sphinx" extra by @hukkin in [#350](https://github.com/executablebooks/MyST-Parser/pull/350)
135+
- ✨ NEW: Add `fieldlist` extension by @chrisjsewell in [#455](https://github.com/executablebooks/MyST-Parser/pull/455)
136+
- ✨ NEW: Add Docutils MyST config and CLI by @cpitclaudel in [#426](https://github.com/executablebooks/MyST-Parser/pull/426)
137+
- 🔧 MAINTAIN: Add publishing job for `myst-docutils` by @chrisjsewell in [#456](https://github.com/executablebooks/MyST-Parser/pull/456)
138+
- 🧪 TESTS: Add for `gettext_additional_targets` by @jpmckinney in [#459](https://github.com/executablebooks/MyST-Parser/pull/459)
139+
140+
### New Contributors
141+
142+
- @cpitclaudel made their first contribution in [#418](https://github.com/executablebooks/MyST-Parser/pull/418)
143+
- @astrojuanlu made their first contribution in [#413](https://github.com/executablebooks/MyST-Parser/pull/413)
144+
145+
**Full Changelog**: <https://github.com/executablebooks/MyST-Parser/compare/v0.15.2...v0.16.0>
146+
3147
## 0.15.2 - 2021-08-26
4148

5149
This is mainly a maintenance release that fixes some incompatibilities with `sphinx<3.1`, improvements for compatibility

myst_parser/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from typing import TYPE_CHECKING
22

3-
__version__ = "0.15.2"
3+
__version__ = "0.16.0"
44

55

66
if TYPE_CHECKING:

0 commit comments

Comments
 (0)