From: Chris S. <chr...@us...> - 2022-01-02 13:26:47
|
--- ** [feature-requests:#86] Replace recommonmark with myst-docutils** **Status:** open **Group:** Default **Created:** Sun Jan 02, 2022 01:26 PM UTC by Chris Sewell **Last Updated:** Sun Jan 02, 2022 01:26 PM UTC **Owner:** nobody Hey guys, As discussed in https://github.com/readthedocs/recommonmark/issues/221, recommonmark has been officially deprecated in favour of https://github.com/executablebooks/MyST-Parser/. In myst-parser v0.16, I added first-class support for direct docutils use (as opposed to via sphinx) and introduced the parallel https://pypi.org/project/myst-docutils/ distribution, which is myst-parser but without explicit install requirements on docutils or sphinx, i.e. you can install myst-docutils with any version of docutils and it will work without sphinx installed. receive(see https://github.com/executablebooks/MyST-Parser/blob/master/CHANGELOG.md#0160---2021-12-06, https://github.com/executablebooks/MyST-Parser/issues/347, and https://myst-parser.readthedocs.io/en/latest/docutils.html) receive receiveIn the master branch (and soon to be myst-docutils v0.17) I have also been working to improve the rigour of the behaviour/testing against this parser. (as an example, I believe your current recommonmark solution does not actually work properly with code fences, because it does not syntax highlight the code, see: https://github.com/executablebooks/MyST-Parser/pull/478) The fixture test sets, essentially provide a full specification of the Markdown -> docutils AST conversion (pre-docutils-transforms): - https://raw.githubusercontent.com/executablebooks/MyST-Parser/master/tests/test_renderers/fixtures/docutil_syntax_elements.md - https://raw.githubusercontent.com/executablebooks/MyST-Parser/master/tests/test_renderers/fixtures/docutil_roles.md - https://raw.githubusercontent.com/executablebooks/MyST-Parser/master/tests/test_renderers/fixtures/docutil_directives.md and are currently tested in the CI for myst-docutils against docutils v0.16, v0.17 and v0.18: https://github.com/executablebooks/MyST-Parser/runs/4670995311?check_suite_focus=true I'm also happy to recieve any feedback / improvement suggestions to facilitate this, and have opened a parallel discussion topic here: https://github.com/executablebooks/MyST-Parser/discussions/487 Cheer, Chris --- Sent from sourceforge.net because doc...@li... is subscribed to https://sourceforge.net/p/docutils/feature-requests/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/docutils/admin/feature-requests/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: Chris S. <chr...@us...> - 2022-01-02 13:29:47
|
As an aside, I am also working on propagating this first-class docutis support to https://github.com/executablebooks/MyST-NB, so you can do e.g. `mystnb-docutils-pseudoxml --report="info" --nb-execution-mode=cache tests/notebooks/basic_unrun.ipynb`, but more on that at a later date :) --- ** [feature-requests:#86] Replace recommonmark with myst-docutils** **Status:** open **Group:** Default **Created:** Sun Jan 02, 2022 01:26 PM UTC by Chris Sewell **Last Updated:** Sun Jan 02, 2022 01:26 PM UTC **Owner:** nobody Hey guys, As discussed in https://github.com/readthedocs/recommonmark/issues/221, recommonmark has been officially deprecated in favour of https://github.com/executablebooks/MyST-Parser/. In myst-parser v0.16, I added first-class support for direct docutils use (as opposed to via sphinx) and introduced the parallel https://pypi.org/project/myst-docutils/ distribution, which is myst-parser but without explicit install requirements on docutils or sphinx, i.e. you can install myst-docutils with any version of docutils and it will work without sphinx installed. receive(see https://github.com/executablebooks/MyST-Parser/blob/master/CHANGELOG.md#0160---2021-12-06, https://github.com/executablebooks/MyST-Parser/issues/347, and https://myst-parser.readthedocs.io/en/latest/docutils.html) receive receiveIn the master branch (and soon to be myst-docutils v0.17) I have also been working to improve the rigour of the behaviour/testing against this parser. (as an example, I believe your current recommonmark solution does not actually work properly with code fences, because it does not syntax highlight the code, see: https://github.com/executablebooks/MyST-Parser/pull/478) The fixture test sets, essentially provide a full specification of the Markdown -> docutils AST conversion (pre-docutils-transforms): - https://raw.githubusercontent.com/executablebooks/MyST-Parser/master/tests/test_renderers/fixtures/docutil_syntax_elements.md - https://raw.githubusercontent.com/executablebooks/MyST-Parser/master/tests/test_renderers/fixtures/docutil_roles.md - https://raw.githubusercontent.com/executablebooks/MyST-Parser/master/tests/test_renderers/fixtures/docutil_directives.md and are currently tested in the CI for myst-docutils against docutils v0.16, v0.17 and v0.18: https://github.com/executablebooks/MyST-Parser/runs/4670995311?check_suite_focus=true I'm also happy to recieve any feedback / improvement suggestions to facilitate this, and have opened a parallel discussion topic here: https://github.com/executablebooks/MyST-Parser/discussions/487 Cheer, Chris --- Sent from sourceforge.net because doc...@li... is subscribed to https://sourceforge.net/p/docutils/feature-requests/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/docutils/admin/feature-requests/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: Günter M. <mi...@us...> - 2022-01-02 15:20:22
|
Since [r8916], "myst" is a parser alias that points to the module `myst_parser.docutils_`. You can use, e.g., `docutils-cli.py --parser=myst` to parse MyST Markdown input. Docutils' config documentation links from the section https://docutils.sourceforge.io/docs/user/config.html#myst-parser to the upstream documentation. I am not in favour of removing "recommonmark" support as long as "recommonmark" is widely available (e.g. as Debian package). We may consider changing the "commonmark" and "markdown" parser aliases to a wrapper module that selects whichever of "myst" or "recommonmark" is installed at the user's system. Is there anything else that would be better done on the Docutils side? --- ** [feature-requests:#86] Replace recommonmark with myst-docutils** **Status:** open **Group:** Default **Created:** Sun Jan 02, 2022 01:26 PM UTC by Chris Sewell **Last Updated:** Sun Jan 02, 2022 01:29 PM UTC **Owner:** nobody Hey guys, As discussed in https://github.com/readthedocs/recommonmark/issues/221, recommonmark has been officially deprecated in favour of https://github.com/executablebooks/MyST-Parser/. In myst-parser v0.16, I added first-class support for direct docutils use (as opposed to via sphinx) and introduced the parallel https://pypi.org/project/myst-docutils/ distribution, which is myst-parser but without explicit install requirements on docutils or sphinx, i.e. you can install myst-docutils with any version of docutils and it will work without sphinx installed. receive(see https://github.com/executablebooks/MyST-Parser/blob/master/CHANGELOG.md#0160---2021-12-06, https://github.com/executablebooks/MyST-Parser/issues/347, and https://myst-parser.readthedocs.io/en/latest/docutils.html) receive receiveIn the master branch (and soon to be myst-docutils v0.17) I have also been working to improve the rigour of the behaviour/testing against this parser. (as an example, I believe your current recommonmark solution does not actually work properly with code fences, because it does not syntax highlight the code, see: https://github.com/executablebooks/MyST-Parser/pull/478) The fixture test sets, essentially provide a full specification of the Markdown -> docutils AST conversion (pre-docutils-transforms): - https://raw.githubusercontent.com/executablebooks/MyST-Parser/master/tests/test_renderers/fixtures/docutil_syntax_elements.md - https://raw.githubusercontent.com/executablebooks/MyST-Parser/master/tests/test_renderers/fixtures/docutil_roles.md - https://raw.githubusercontent.com/executablebooks/MyST-Parser/master/tests/test_renderers/fixtures/docutil_directives.md and are currently tested in the CI for myst-docutils against docutils v0.16, v0.17 and v0.18: https://github.com/executablebooks/MyST-Parser/runs/4670995311?check_suite_focus=true I'm also happy to recieve any feedback / improvement suggestions to facilitate this, and have opened a parallel discussion topic here: https://github.com/executablebooks/MyST-Parser/discussions/487 Cheer, Chris --- Sent from sourceforge.net because doc...@li... is subscribed to https://sourceforge.net/p/docutils/feature-requests/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/docutils/admin/feature-requests/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: Chris S. <chr...@us...> - 2022-01-02 16:12:06
|
That great cheers, indeed the aliases are the main thing here: I would prefer docutils itself did not override the `myst_parser.docutils_.Parser` (as it does for the recommonmark parser) and instead any required changes/improvements were implemented directly in myst-parser. Obviously, I will leave it up to you guys, as to any testing you want to include directly in docutils. For the "markdown"/"commonmark" alias, I would certainly be for it using myst-parser, but note that this would currently be equivalent to: `docutils-cli.py --parser=myst --myst-commonmark-only=yes`. This "turns off" any syntax that is not strictly part of https://spec.commonmark.org/0.30/, such as tables and footnotes. (you can see the implementation logic at: https://github.com/executablebooks/MyST-Parser/blob/0f2902ab5eb6236805ed24dc387b34c00fe41744/myst_parser/main.py#L226) There could perhaps be a slight override for this. Similarly, it might be interesting to note that the Github Flavoured Markdown spec: https://github.github.com/gfm/, is roughly equivalent to: `docutils-cli.py --parse=myst --myst-enable-extensions=linkify,tasklist --myst-disable_syntax=footnote_ref,footnote_def`. The only thing that cannot be replicated from that spec currently is strikethrough: it is available in the markdown-it parser, but docutils does not have any native node class to support it :( --- ** [feature-requests:#86] Replace recommonmark with myst-docutils** **Status:** open **Group:** Default **Created:** Sun Jan 02, 2022 01:26 PM UTC by Chris Sewell **Last Updated:** Sun Jan 02, 2022 01:29 PM UTC **Owner:** nobody Hey guys, As discussed in https://github.com/readthedocs/recommonmark/issues/221, recommonmark has been officially deprecated in favour of https://github.com/executablebooks/MyST-Parser/. In myst-parser v0.16, I added first-class support for direct docutils use (as opposed to via sphinx) and introduced the parallel https://pypi.org/project/myst-docutils/ distribution, which is myst-parser but without explicit install requirements on docutils or sphinx, i.e. you can install myst-docutils with any version of docutils and it will work without sphinx installed. receive(see https://github.com/executablebooks/MyST-Parser/blob/master/CHANGELOG.md#0160---2021-12-06, https://github.com/executablebooks/MyST-Parser/issues/347, and https://myst-parser.readthedocs.io/en/latest/docutils.html) receive receiveIn the master branch (and soon to be myst-docutils v0.17) I have also been working to improve the rigour of the behaviour/testing against this parser. (as an example, I believe your current recommonmark solution does not actually work properly with code fences, because it does not syntax highlight the code, see: https://github.com/executablebooks/MyST-Parser/pull/478) The fixture test sets, essentially provide a full specification of the Markdown -> docutils AST conversion (pre-docutils-transforms): - https://raw.githubusercontent.com/executablebooks/MyST-Parser/master/tests/test_renderers/fixtures/docutil_syntax_elements.md - https://raw.githubusercontent.com/executablebooks/MyST-Parser/master/tests/test_renderers/fixtures/docutil_roles.md - https://raw.githubusercontent.com/executablebooks/MyST-Parser/master/tests/test_renderers/fixtures/docutil_directives.md and are currently tested in the CI for myst-docutils against docutils v0.16, v0.17 and v0.18: https://github.com/executablebooks/MyST-Parser/runs/4670995311?check_suite_focus=true I'm also happy to recieve any feedback / improvement suggestions to facilitate this, and have opened a parallel discussion topic here: https://github.com/executablebooks/MyST-Parser/discussions/487 Cheer, Chris --- Sent from sourceforge.net because doc...@li... is subscribed to https://sourceforge.net/p/docutils/feature-requests/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/docutils/admin/feature-requests/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: Günter M. <mi...@us...> - 2022-01-02 21:30:45
|
> I would prefer docutils itself did not override the > `myst_parser.docutils_.Parser` (as it does for the recommonmark parser) > and instead any required changes/improvements were implemented directly > in myst-parser. Agreed. So we may close the ticket as "open-fixed"? > For the "markdown"/"commonmark" alias, I would certainly be for it > using myst-parser, but note that this would currently be equivalent to: > `docutils-cli.py --parser=myst --myst-commonmark-only=yes`. This would require a (light) "parser wrapper" for commonmark that sets the "myst_commonmark_only" setting default to `True`. --- ** [feature-requests:#86] Replace recommonmark with myst-docutils** **Status:** open **Group:** Default **Created:** Sun Jan 02, 2022 01:26 PM UTC by Chris Sewell **Last Updated:** Sun Jan 02, 2022 04:53 PM UTC **Owner:** nobody Hey guys, As discussed in https://github.com/readthedocs/recommonmark/issues/221, recommonmark has been officially deprecated in favour of https://github.com/executablebooks/MyST-Parser/. In myst-parser v0.16, I added first-class support for direct docutils use (as opposed to via sphinx) and introduced the parallel https://pypi.org/project/myst-docutils/ distribution, which is myst-parser but without explicit install requirements on docutils or sphinx, i.e. you can install myst-docutils with any version of docutils and it will work without sphinx installed. receive(see https://github.com/executablebooks/MyST-Parser/blob/master/CHANGELOG.md#0160---2021-12-06, https://github.com/executablebooks/MyST-Parser/issues/347, and https://myst-parser.readthedocs.io/en/latest/docutils.html) receive receiveIn the master branch (and soon to be myst-docutils v0.17) I have also been working to improve the rigour of the behaviour/testing against this parser. (as an example, I believe your current recommonmark solution does not actually work properly with code fences, because it does not syntax highlight the code, see: https://github.com/executablebooks/MyST-Parser/pull/478) The fixture test sets, essentially provide a full specification of the Markdown -> docutils AST conversion (pre-docutils-transforms): - https://raw.githubusercontent.com/executablebooks/MyST-Parser/master/tests/test_renderers/fixtures/docutil_syntax_elements.md - https://raw.githubusercontent.com/executablebooks/MyST-Parser/master/tests/test_renderers/fixtures/docutil_roles.md - https://raw.githubusercontent.com/executablebooks/MyST-Parser/master/tests/test_renderers/fixtures/docutil_directives.md and are currently tested in the CI for myst-docutils against docutils v0.16, v0.17 and v0.18: https://github.com/executablebooks/MyST-Parser/runs/4670995311?check_suite_focus=true I'm also happy to recieve any feedback / improvement suggestions to facilitate this, and have opened a parallel discussion topic here: https://github.com/executablebooks/MyST-Parser/discussions/487 Cheer, Chris --- Sent from sourceforge.net because doc...@li... is subscribed to https://sourceforge.net/p/docutils/feature-requests/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/docutils/admin/feature-requests/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: Clément Pit-C. <cre...@us...> - 2022-01-02 16:53:31
|
Just a note to say congratulations on this, folks. I'm excited to see MyST become a first-class citizen of the Docutils ecosystem :) --- ** [feature-requests:#86] Replace recommonmark with myst-docutils** **Status:** open **Group:** Default **Created:** Sun Jan 02, 2022 01:26 PM UTC by Chris Sewell **Last Updated:** Sun Jan 02, 2022 04:12 PM UTC **Owner:** nobody Hey guys, As discussed in https://github.com/readthedocs/recommonmark/issues/221, recommonmark has been officially deprecated in favour of https://github.com/executablebooks/MyST-Parser/. In myst-parser v0.16, I added first-class support for direct docutils use (as opposed to via sphinx) and introduced the parallel https://pypi.org/project/myst-docutils/ distribution, which is myst-parser but without explicit install requirements on docutils or sphinx, i.e. you can install myst-docutils with any version of docutils and it will work without sphinx installed. receive(see https://github.com/executablebooks/MyST-Parser/blob/master/CHANGELOG.md#0160---2021-12-06, https://github.com/executablebooks/MyST-Parser/issues/347, and https://myst-parser.readthedocs.io/en/latest/docutils.html) receive receiveIn the master branch (and soon to be myst-docutils v0.17) I have also been working to improve the rigour of the behaviour/testing against this parser. (as an example, I believe your current recommonmark solution does not actually work properly with code fences, because it does not syntax highlight the code, see: https://github.com/executablebooks/MyST-Parser/pull/478) The fixture test sets, essentially provide a full specification of the Markdown -> docutils AST conversion (pre-docutils-transforms): - https://raw.githubusercontent.com/executablebooks/MyST-Parser/master/tests/test_renderers/fixtures/docutil_syntax_elements.md - https://raw.githubusercontent.com/executablebooks/MyST-Parser/master/tests/test_renderers/fixtures/docutil_roles.md - https://raw.githubusercontent.com/executablebooks/MyST-Parser/master/tests/test_renderers/fixtures/docutil_directives.md and are currently tested in the CI for myst-docutils against docutils v0.16, v0.17 and v0.18: https://github.com/executablebooks/MyST-Parser/runs/4670995311?check_suite_focus=true I'm also happy to recieve any feedback / improvement suggestions to facilitate this, and have opened a parallel discussion topic here: https://github.com/executablebooks/MyST-Parser/discussions/487 Cheer, Chris --- Sent from sourceforge.net because doc...@li... is subscribed to https://sourceforge.net/p/docutils/feature-requests/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/docutils/admin/feature-requests/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: Chris S. <chr...@us...> - 2022-01-05 17:58:17
|
Well thank you for your help Clement! > Agreed. So we may close the ticket as "open-fixed"? Sounds good to me thanks, and don't hesitate to get in touch for any other related issues :) --- ** [feature-requests:#86] Replace recommonmark with myst-docutils** **Status:** open **Group:** Default **Created:** Sun Jan 02, 2022 01:26 PM UTC by Chris Sewell **Last Updated:** Sun Jan 02, 2022 04:53 PM UTC **Owner:** nobody Hey guys, As discussed in https://github.com/readthedocs/recommonmark/issues/221, recommonmark has been officially deprecated in favour of https://github.com/executablebooks/MyST-Parser/. In myst-parser v0.16, I added first-class support for direct docutils use (as opposed to via sphinx) and introduced the parallel https://pypi.org/project/myst-docutils/ distribution, which is myst-parser but without explicit install requirements on docutils or sphinx, i.e. you can install myst-docutils with any version of docutils and it will work without sphinx installed. receive(see https://github.com/executablebooks/MyST-Parser/blob/master/CHANGELOG.md#0160---2021-12-06, https://github.com/executablebooks/MyST-Parser/issues/347, and https://myst-parser.readthedocs.io/en/latest/docutils.html) receive receiveIn the master branch (and soon to be myst-docutils v0.17) I have also been working to improve the rigour of the behaviour/testing against this parser. (as an example, I believe your current recommonmark solution does not actually work properly with code fences, because it does not syntax highlight the code, see: https://github.com/executablebooks/MyST-Parser/pull/478) The fixture test sets, essentially provide a full specification of the Markdown -> docutils AST conversion (pre-docutils-transforms): - https://raw.githubusercontent.com/executablebooks/MyST-Parser/master/tests/test_renderers/fixtures/docutil_syntax_elements.md - https://raw.githubusercontent.com/executablebooks/MyST-Parser/master/tests/test_renderers/fixtures/docutil_roles.md - https://raw.githubusercontent.com/executablebooks/MyST-Parser/master/tests/test_renderers/fixtures/docutil_directives.md and are currently tested in the CI for myst-docutils against docutils v0.16, v0.17 and v0.18: https://github.com/executablebooks/MyST-Parser/runs/4670995311?check_suite_focus=true I'm also happy to recieve any feedback / improvement suggestions to facilitate this, and have opened a parallel discussion topic here: https://github.com/executablebooks/MyST-Parser/discussions/487 Cheer, Chris --- Sent from sourceforge.net because doc...@li... is subscribed to https://sourceforge.net/p/docutils/feature-requests/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/docutils/admin/feature-requests/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: Günter M. <mi...@us...> - 2022-01-06 14:07:52
|
- **status**: open --> open-fixed - **Comment**: Marking this as fixed, will close once the next release is out. BTW: what is the state of https://pypi.org/project/pycmark/ by @ tk0miya? It looks promising as a lightweight alternative for pure CommonMark as it only depends on Docutils. Thank you all for the good work. --- ** [feature-requests:#86] Replace recommonmark with myst-docutils** **Status:** open-fixed **Group:** Default **Created:** Sun Jan 02, 2022 01:26 PM UTC by Chris Sewell **Last Updated:** Wed Jan 05, 2022 05:58 PM UTC **Owner:** nobody Hey guys, As discussed in https://github.com/readthedocs/recommonmark/issues/221, recommonmark has been officially deprecated in favour of https://github.com/executablebooks/MyST-Parser/. In myst-parser v0.16, I added first-class support for direct docutils use (as opposed to via sphinx) and introduced the parallel https://pypi.org/project/myst-docutils/ distribution, which is myst-parser but without explicit install requirements on docutils or sphinx, i.e. you can install myst-docutils with any version of docutils and it will work without sphinx installed. receive(see https://github.com/executablebooks/MyST-Parser/blob/master/CHANGELOG.md#0160---2021-12-06, https://github.com/executablebooks/MyST-Parser/issues/347, and https://myst-parser.readthedocs.io/en/latest/docutils.html) receive receiveIn the master branch (and soon to be myst-docutils v0.17) I have also been working to improve the rigour of the behaviour/testing against this parser. (as an example, I believe your current recommonmark solution does not actually work properly with code fences, because it does not syntax highlight the code, see: https://github.com/executablebooks/MyST-Parser/pull/478) The fixture test sets, essentially provide a full specification of the Markdown -> docutils AST conversion (pre-docutils-transforms): - https://raw.githubusercontent.com/executablebooks/MyST-Parser/master/tests/test_renderers/fixtures/docutil_syntax_elements.md - https://raw.githubusercontent.com/executablebooks/MyST-Parser/master/tests/test_renderers/fixtures/docutil_roles.md - https://raw.githubusercontent.com/executablebooks/MyST-Parser/master/tests/test_renderers/fixtures/docutil_directives.md and are currently tested in the CI for myst-docutils against docutils v0.16, v0.17 and v0.18: https://github.com/executablebooks/MyST-Parser/runs/4670995311?check_suite_focus=true I'm also happy to recieve any feedback / improvement suggestions to facilitate this, and have opened a parallel discussion topic here: https://github.com/executablebooks/MyST-Parser/discussions/487 Cheer, Chris --- Sent from sourceforge.net because doc...@li... is subscribed to https://sourceforge.net/p/docutils/feature-requests/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/docutils/admin/feature-requests/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: Komiya T. <i.t...@gm...> - 2022-01-08 06:25:07
|
>BTW: what is the state of https://pypi.org/project/pycmark/ by @ tk0miya? >It looks promising as a lightweight alternative for pure CommonMark I finished my work. It has been fully compatible with CommonMark. The remaining task is creating an extension for sphinx using pycmark and pycmark-gfm. I thought to release v1.0 after that, but I lost my interest for it because myst-parser has appeared. 2022年1月6日(木) 23:08 "Günter Milde" via Docutils-develop <doc...@li...>: > > status: open --> open-fixed > Comment: > > Marking this as fixed, will close once the next release is out. > > BTW: what is the state of https://pypi.org/project/pycmark/ by @ tk0miya? > It looks promising as a lightweight alternative for pure CommonMark > as it only depends on Docutils. > > Thank you all for the good work. > > ________________________________ > > [feature-requests:#86] Replace recommonmark with myst-docutils > > Status: open-fixed > Group: Default > Created: Sun Jan 02, 2022 01:26 PM UTC by Chris Sewell > Last Updated: Wed Jan 05, 2022 05:58 PM UTC > Owner: nobody > > Hey guys, > > As discussed in https://github.com/readthedocs/recommonmark/issues/221, recommonmark has been officially deprecated in favour of https://github.com/executablebooks/MyST-Parser/. > > In myst-parser v0.16, I added first-class support for direct docutils use (as opposed to via sphinx) and introduced the parallel https://pypi.org/project/myst-docutils/ distribution, which is myst-parser but without explicit install requirements on docutils or sphinx, i.e. you can install myst-docutils with any version of docutils and it will work without sphinx installed. > > receive(see https://github.com/executablebooks/MyST-Parser/blob/master/CHANGELOG.md#0160---2021-12-06, https://github.com/executablebooks/MyST-Parser/issues/347, and https://myst-parser.readthedocs.io/en/latest/docutils.html) > receive > receiveIn the master branch (and soon to be myst-docutils v0.17) I have also been working to improve the rigour of the behaviour/testing against this parser. > (as an example, I believe your current recommonmark solution does not actually work properly with code fences, because it does not syntax highlight the code, see: https://github.com/executablebooks/MyST-Parser/pull/478) > > The fixture test sets, essentially provide a full specification of the Markdown -> docutils AST conversion (pre-docutils-transforms): > > https://raw.githubusercontent.com/executablebooks/MyST-Parser/master/tests/test_renderers/fixtures/docutil_syntax_elements.md > https://raw.githubusercontent.com/executablebooks/MyST-Parser/master/tests/test_renderers/fixtures/docutil_roles.md > https://raw.githubusercontent.com/executablebooks/MyST-Parser/master/tests/test_renderers/fixtures/docutil_directives.md > > and are currently tested in the CI for myst-docutils against docutils v0.16, v0.17 and v0.18: https://github.com/executablebooks/MyST-Parser/runs/4670995311?check_suite_focus=true > > I'm also happy to recieve any feedback / improvement suggestions to facilitate this, and have opened a parallel discussion topic here: https://github.com/executablebooks/MyST-Parser/discussions/487 > > Cheer, > Chris > > ________________________________ > > Sent from sourceforge.net because doc...@li... is subscribed to https://sourceforge.net/p/docutils/feature-requests/ > > To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/docutils/admin/feature-requests/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. > > _______________________________________________ > Docutils-develop mailing list > Doc...@li... > https://lists.sourceforge.net/lists/listinfo/docutils-develop > > Please use "Reply All" to reply to the list. |
From: Takeshi K. <tk...@us...> - 2022-01-08 07:27:31
|
>BTW: what is the state of https://pypi.org/project/pycmark/ by @ tk0miya? >It looks promising as a lightweight alternative for pure CommonMark I finished my work. It has been fully compatible with CommonMark. The remaining task is creating an extension for sphinx using pycmark and pycmark-gfm. I thought to release v1.0 after that, but I lost my interest for it because myst-parser has appeared. 2022年1月6日(木) 23:08 "Günter Milde" via Docutils-develop <doc...@li...>: > > status: open --> open-fixed > Comment: > > Marking this as fixed, will close once the next release is out. > > BTW: what is the state of https://pypi.org/project/pycmark/ by @ tk0miya? > It looks promising as a lightweight alternative for pure CommonMark > as it only depends on Docutils. > > Thank you all for the good work. > > ________________________________ > > [feature-requests:#86] Replace recommonmark with myst-docutils > > Status: open-fixed > Group: Default > Created: Sun Jan 02, 2022 01:26 PM UTC by Chris Sewell > Last Updated: Wed Jan 05, 2022 05:58 PM UTC > Owner: nobody > > Hey guys, > > As discussed in https://github.com/readthedocs/recommonmark/issues/221, recommonmark has been officially deprecated in favour of https://github.com/executablebooks/MyST-Parser/. > > In myst-parser v0.16, I added first-class support for direct docutils use (as opposed to via sphinx) and introduced the parallel https://pypi.org/project/myst-docutils/ distribution, which is myst-parser but without explicit install requirements on docutils or sphinx, i.e. you can install myst-docutils with any version of docutils and it will work without sphinx installed. > > receive(see https://github.com/executablebooks/MyST-Parser/blob/master/CHANGELOG.md#0160---2021-12-06, https://github.com/executablebooks/MyST-Parser/issues/347, and https://myst-parser.readthedocs.io/en/latest/docutils.html) > receive > receiveIn the master branch (and soon to be myst-docutils v0.17) I have also been working to improve the rigour of the behaviour/testing against this parser. > (as an example, I believe your current recommonmark solution does not actually work properly with code fences, because it does not syntax highlight the code, see: https://github.com/executablebooks/MyST-Parser/pull/478) > > The fixture test sets, essentially provide a full specification of the Markdown -> docutils AST conversion (pre-docutils-transforms): > > https://raw.githubusercontent.com/executablebooks/MyST-Parser/master/tests/test_renderers/fixtures/docutil_syntax_elements.md > https://raw.githubusercontent.com/executablebooks/MyST-Parser/master/tests/test_renderers/fixtures/docutil_roles.md > https://raw.githubusercontent.com/executablebooks/MyST-Parser/master/tests/test_renderers/fixtures/docutil_directives.md > > and are currently tested in the CI for myst-docutils against docutils v0.16, v0.17 and v0.18: https://github.com/executablebooks/MyST-Parser/runs/4670995311?check_suite_focus=true > > I'm also happy to recieve any feedback / improvement suggestions to facilitate this, and have opened a parallel discussion topic here: https://github.com/executablebooks/MyST-Parser/discussions/487 > > Cheer, > Chris > > ________________________________ > > Sent from sourceforge.net because doc...@li... is subscribed to https://sourceforge.net/p/docutils/feature-requests/ > > To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/docutils/admin/feature-requests/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. > > _______________________________________________ > Docutils-develop mailing list > Doc...@li... > https://lists.sourceforge.net/lists/listinfo/docutils-develop > > Please use "Reply All" to reply to the list. --- ** [feature-requests:#86] Replace recommonmark with myst-docutils** **Status:** open-fixed **Group:** Default **Created:** Sun Jan 02, 2022 01:26 PM UTC by Chris Sewell **Last Updated:** Thu Jan 06, 2022 02:07 PM UTC **Owner:** nobody Hey guys, As discussed in https://github.com/readthedocs/recommonmark/issues/221, recommonmark has been officially deprecated in favour of https://github.com/executablebooks/MyST-Parser/. In myst-parser v0.16, I added first-class support for direct docutils use (as opposed to via sphinx) and introduced the parallel https://pypi.org/project/myst-docutils/ distribution, which is myst-parser but without explicit install requirements on docutils or sphinx, i.e. you can install myst-docutils with any version of docutils and it will work without sphinx installed. receive(see https://github.com/executablebooks/MyST-Parser/blob/master/CHANGELOG.md#0160---2021-12-06, https://github.com/executablebooks/MyST-Parser/issues/347, and https://myst-parser.readthedocs.io/en/latest/docutils.html) receive receiveIn the master branch (and soon to be myst-docutils v0.17) I have also been working to improve the rigour of the behaviour/testing against this parser. (as an example, I believe your current recommonmark solution does not actually work properly with code fences, because it does not syntax highlight the code, see: https://github.com/executablebooks/MyST-Parser/pull/478) The fixture test sets, essentially provide a full specification of the Markdown -> docutils AST conversion (pre-docutils-transforms): - https://raw.githubusercontent.com/executablebooks/MyST-Parser/master/tests/test_renderers/fixtures/docutil_syntax_elements.md - https://raw.githubusercontent.com/executablebooks/MyST-Parser/master/tests/test_renderers/fixtures/docutil_roles.md - https://raw.githubusercontent.com/executablebooks/MyST-Parser/master/tests/test_renderers/fixtures/docutil_directives.md and are currently tested in the CI for myst-docutils against docutils v0.16, v0.17 and v0.18: https://github.com/executablebooks/MyST-Parser/runs/4670995311?check_suite_focus=true I'm also happy to recieve any feedback / improvement suggestions to facilitate this, and have opened a parallel discussion topic here: https://github.com/executablebooks/MyST-Parser/discussions/487 Cheer, Chris --- Sent from sourceforge.net because doc...@li... is subscribed to https://sourceforge.net/p/docutils/feature-requests/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/docutils/admin/feature-requests/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: Guenter M. <mi...@us...> - 2022-01-08 17:27:16
|
Dear Takeshi KOMIYA, thank you for the fast reply. On 2022-01-08, Takeshi KOMIYA wrote: > I finished my work. It has been fully compatible with CommonMark. I tested pycmark today and could get it to work with `docutils-cli.py` after a small modification: Running:: docutils-cli --parser=pycmark I got a ``NotImplementedError('subclass must override this method')``. The reason is, that `docutils.parsers.get_parser_class(parser_name)` looks for a `Parser` class inside the module named `parser_name`. However, pycmark/__init__.py imports the upstream base class: from docutils.parsers import Parser I could fix this changing the above import line to import docutils.parsers and the parser class definition to start with class Parser(docutils.parsers.Parser): """CommonMark parser for docutils.""" Now, pycmark.Parser is the CommonMark parser (as expected by Docutils) and `docutils-cli --parser=pycmark` worked as a charm. A quick-and-dirty test run showed that "pycmark" can act as a handy drop-in Markdown/CommonMark parser. The advantage of `docutils-cli --parser=pycmark` over pycmark's `md2html` is, that it offers the choice of all available writers from the command line. > I thought to release v1.0 after that, but I lost my interest for it > because myst-parser has appeared. Would you consider the above change in pycmark (With either adapting or dropping the `md2html` "entry-point")? As a second best alternative, I could write a thin wrapper module in Docutils. We would then have a selection of 3 CommonMark parsers: myst: fully-featured and actively maintained pycmark: lightweight, no further dependencies recommonmark: long standing (also available as Debian package) unmaintained/deprecated :( Thanks, Günter |
From: Komiya T. <i.t...@gm...> - 2022-01-09 14:41:31
|
Now I released pycmark-0.9.6 and pycmark-gfm-0.9.6 that contain renamed "Parser" classes on the top of the modules. I hope it helps to integrate with docutils. Thanks, 2022年1月9日(日) 2:27 Guenter Milde via Docutils-develop <doc...@li...>: > > Dear Takeshi KOMIYA, > > thank you for the fast reply. > > On 2022-01-08, Takeshi KOMIYA wrote: > > > I finished my work. It has been fully compatible with CommonMark. > > I tested pycmark today and could get it to work with `docutils-cli.py` > after a small modification: > > Running:: > > docutils-cli --parser=pycmark > > I got a ``NotImplementedError('subclass must override this method')``. > > The reason is, that `docutils.parsers.get_parser_class(parser_name)` > looks for a `Parser` class inside the module named `parser_name`. > However, pycmark/__init__.py imports the upstream base class: > > from docutils.parsers import Parser > > > I could fix this changing the above import line to > > import docutils.parsers > > and the parser class definition to start with > > class Parser(docutils.parsers.Parser): > """CommonMark parser for docutils.""" > > Now, pycmark.Parser is the CommonMark parser (as expected by Docutils) > and `docutils-cli --parser=pycmark` worked as a charm. > A quick-and-dirty test run showed that "pycmark" can act > as a handy drop-in Markdown/CommonMark parser. > > The advantage of `docutils-cli --parser=pycmark` over pycmark's `md2html` > is, that it offers the choice of all available writers from the command > line. > > > I thought to release v1.0 after that, but I lost my interest for it > > because myst-parser has appeared. > > Would you consider the above change in pycmark > (With either adapting or dropping the `md2html` "entry-point")? > > As a second best alternative, I could write a thin wrapper module in > Docutils. > > We would then have a selection of 3 CommonMark parsers: > > myst: > fully-featured and actively maintained > > pycmark: > lightweight, no further dependencies > > recommonmark: > long standing (also available as Debian package) > unmaintained/deprecated :( > > > Thanks, > Günter > > > > _______________________________________________ > Docutils-develop mailing list > Doc...@li... > https://lists.sourceforge.net/lists/listinfo/docutils-develop > > Please use "Reply All" to reply to the list. |
From: Guenter M. <mi...@us...> - 2022-01-11 16:16:45
|
Dear Komiya Takeshi, Thank you for the fast fix. On 2022-01-09, Komiya Takeshi wrote: > Now I released pycmark-0.9.6 and pycmark-gfm-0.9.6 that contain > renamed "Parser" classes on the top of the modules. > I hope it helps to integrate with docutils. This helps a lot. Now, `docutils-cli.py --parser=pycmark` works and allows to convert an Markdown document to all output formats supported by Docutils (in principle, not tested yet). IMV, the `pycmark` package is the most simple/lightweight way to get Markdown support in Docutils. Do you plan some more work on the package or basically want to retire it in favour of "myst"? Which is your preferred way of raising questions, report bugs, or suggest features/changes? Experimenting with the sample document https://github.com/thephpleague/commonmark/raw/main/tests/benchmark/sample.md I was met with an AssertionError:: File ".../docutils/writers/_html_base.py", line 1427, in visit_reference assert len(node) == 1 and isinstance(node[0], nodes.image) A minimal input example is a link in a list:: * [Overview](http://example.com) The problem is, that pycmark puts inline elements directly into the <list_item> node while the docutils.dtd Document Tree specification says that <list_item> may only contain body elements. https://docutils.sourceforge.io/docs/ref/doctree.html#list-item I don't know which other constructs are affected. Testing the validity of XML documents created by ``docutils-cli --parser=pycmark --writer=xml --indent`` with ``xmllint --valid`` may help to spot problems. Thanks again, Günter |
From: Günter M. <mi...@us...> - 2022-07-06 06:28:10
|
- **status**: open-fixed --> closed-fixed - **Comment**: Release 0.19 (2022-07-05) supports parsing "Markdown" input with 3rd party parsers myst, pycmark, or recommonmark. Examples: Master documents #> docutils --parser=markdown README.md README.html Included documents: ~~~rst .. include:: README.md :parser: markdown ~~~ Thank you for your contributions --- ** [feature-requests:#86] Replace recommonmark with myst-docutils** **Status:** closed-fixed **Group:** Default **Created:** Sun Jan 02, 2022 01:26 PM UTC by Chris Sewell **Last Updated:** Thu Jan 06, 2022 02:07 PM UTC **Owner:** nobody Hey guys, As discussed in https://github.com/readthedocs/recommonmark/issues/221, recommonmark has been officially deprecated in favour of https://github.com/executablebooks/MyST-Parser/. In myst-parser v0.16, I added first-class support for direct docutils use (as opposed to via sphinx) and introduced the parallel https://pypi.org/project/myst-docutils/ distribution, which is myst-parser but without explicit install requirements on docutils or sphinx, i.e. you can install myst-docutils with any version of docutils and it will work without sphinx installed. receive(see https://github.com/executablebooks/MyST-Parser/blob/master/CHANGELOG.md#0160---2021-12-06, https://github.com/executablebooks/MyST-Parser/issues/347, and https://myst-parser.readthedocs.io/en/latest/docutils.html) receive receiveIn the master branch (and soon to be myst-docutils v0.17) I have also been working to improve the rigour of the behaviour/testing against this parser. (as an example, I believe your current recommonmark solution does not actually work properly with code fences, because it does not syntax highlight the code, see: https://github.com/executablebooks/MyST-Parser/pull/478) The fixture test sets, essentially provide a full specification of the Markdown -> docutils AST conversion (pre-docutils-transforms): - https://raw.githubusercontent.com/executablebooks/MyST-Parser/master/tests/test_renderers/fixtures/docutil_syntax_elements.md - https://raw.githubusercontent.com/executablebooks/MyST-Parser/master/tests/test_renderers/fixtures/docutil_roles.md - https://raw.githubusercontent.com/executablebooks/MyST-Parser/master/tests/test_renderers/fixtures/docutil_directives.md and are currently tested in the CI for myst-docutils against docutils v0.16, v0.17 and v0.18: https://github.com/executablebooks/MyST-Parser/runs/4670995311?check_suite_focus=true I'm also happy to recieve any feedback / improvement suggestions to facilitate this, and have opened a parallel discussion topic here: https://github.com/executablebooks/MyST-Parser/discussions/487 Cheer, Chris --- Sent from sourceforge.net because doc...@li... is subscribed to https://sourceforge.net/p/docutils/feature-requests/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/docutils/admin/feature-requests/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |