-
Notifications
You must be signed in to change notification settings - Fork 202
Comparing changes
Open a pull request
base repository: executablebooks/MyST-Parser
base: v0.18.1
head repository: executablebooks/MyST-Parser
compare: v0.19.0
Commits on Dec 5, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 11756a1 - Browse repository at this point
Copy the full SHA 11756a1View commit details -
[pre-commit.ci] pre-commit autoupdate (#625)
Co-authored-by: Chris Sewell <chrisj_sewell@hotmail.com>
Configuration menu - View commit details
-
Copy full SHA for e5c844d - Browse repository at this point
Copy the full SHA e5c844dView commit details -
Configuration menu - View commit details
-
Copy full SHA for c2f0416 - Browse repository at this point
Copy the full SHA c2f0416View commit details
Commits on Jan 4, 2023
-
✨ NEW: Add inventory reader and CLI (#656)
Extracted from sphinx for use independently.
Configuration menu - View commit details
-
Copy full SHA for 386fe2d - Browse repository at this point
Copy the full SHA 386fe2dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8ea5398 - Browse repository at this point
Copy the full SHA 8ea5398View commit details -
🐛 FIX: Remove unnecessary assert (#659)
Co-authored-by: Chris Sewell <chrisj_sewell@hotmail.com> Fixes #657
Configuration menu - View commit details
-
Copy full SHA for 9a4de68 - Browse repository at this point
Copy the full SHA 9a4de68View commit details -
✨ NEW: suppress warnings in docutils (#655)
with `myst_suppress_warnings` option, which works the same as sphinx `suppress_warnings`.
Configuration menu - View commit details
-
Copy full SHA for 1b84a5b - Browse repository at this point
Copy the full SHA 1b84a5bView commit details
Commits on Jan 5, 2023
-
✨ NEW: Add
attrs_inline
extension (#654)By adding `"attrs_inline"` to `myst_enable_extensions` (in the sphinx `conf.py`), you can enable parsing of inline attributes after certain inline syntaxes. This is adapted from [djot inline attributes](https://htmlpreview.github.io/?https://github.com/jgm/djot/blob/master/doc/syntax.html#inline-attributes), and also related to [pandoc bracketed spans](https://pandoc.org/MANUAL.html#extension-bracketed_spans). This extension replaces `"attrs_image"`, which is still present, but deprecated.
Configuration menu - View commit details
-
Copy full SHA for bf56662 - Browse repository at this point
Copy the full SHA bf56662View commit details -
1
Configuration menu - View commit details
-
Copy full SHA for 2a206a8 - Browse repository at this point
Copy the full SHA 2a206a8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 23ae135 - Browse repository at this point
Copy the full SHA 23ae135View commit details
Commits on Jan 6, 2023
-
👌 Reference attributes title -> reftitle (#666)
Sphinx will output reftitle as the HTML title attr. See: https://github.com/sphinx-doc/sphinx/blob/6e6b9ad45194177811551c77f5f4040213d1c661/sphinx/writers/html5.py#L227
Configuration menu - View commit details
-
Copy full SHA for 936cba7 - Browse repository at this point
Copy the full SHA 936cba7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2a5bd61 - Browse repository at this point
Copy the full SHA 2a5bd61View commit details -
Configuration menu - View commit details
-
Copy full SHA for 74b21f7 - Browse repository at this point
Copy the full SHA 74b21f7View commit details -
Configuration menu - View commit details
-
Copy full SHA for ebb5b9f - Browse repository at this point
Copy the full SHA ebb5b9fView commit details
Commits on Jan 8, 2023
-
👌
‼️ Allow meta_html/substitutions in docutils (#672)Refactors `myst_parser/parsers/docutils_.py` slightly, by removing `DOCUTILS_EXCLUDED_ARGS`, and removing the `excluded` argument from `create_myst_settings_spec` and `create_myst_config`.
Configuration menu - View commit details
-
Copy full SHA for 66881ef - Browse repository at this point
Copy the full SHA 66881efView commit details
Commits on Jan 10, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 38559cb - Browse repository at this point
Copy the full SHA 38559cbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4904a4f - Browse repository at this point
Copy the full SHA 4904a4fView commit details -
🔧 ci(deps): setup dependabot (#669)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Chris Sewell <chrisj_sewell@hotmail.com>
Configuration menu - View commit details
-
Copy full SHA for 797af5f - Browse repository at this point
Copy the full SHA 797af5fView commit details
Commits on Jan 11, 2023
-
👌 IMPROVE: Allow for heading anchor links in docutils (#678)
This aligns the treatment of `[](#target)` style links for docutils with sphinx, such that they are linked to a heading slug. The core behaviour for sphinx is not changed, except that failed reference resolution now emits a `myst.xref_missing` warning (as opposed to a `std.ref` one), with a clearer warning message. Also on failure, the reference is still created, for people who wish to suppress the warning (see e.g. #677)
Configuration menu - View commit details
-
Copy full SHA for 8daa00b - Browse repository at this point
Copy the full SHA 8daa00bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 01ca355 - Browse repository at this point
Copy the full SHA 01ca355View commit details -
Configuration menu - View commit details
-
Copy full SHA for 505ac77 - Browse repository at this point
Copy the full SHA 505ac77View commit details
Commits on Jan 12, 2023
-
⬆️ Update pytest requirement from <7,>=6 to >=7,<8 (#674)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Chris Sewell <chrisj_sewell@hotmail.com>
Configuration menu - View commit details
-
Copy full SHA for 3a7563f - Browse repository at this point
Copy the full SHA 3a7563fView commit details -
⬆️ Update sphinxext-opengraph requirement from ~=0.6.3 to ~=0.7.5 (#676)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for dff96c4 - Browse repository at this point
Copy the full SHA dff96c4View commit details -
Configuration menu - View commit details
-
Copy full SHA for aa3f04d - Browse repository at this point
Copy the full SHA aa3f04dView commit details -
👌 Change non-fatal directive parsing errors to warnings (#682)
For non-fatal errors, such as; faulty options syntax, unknown option keys, and invalid option values, a warning is raised, but the directive is still run (without the erroneous options). The warning is given the `myst.directive_parse` type, which can be suppressed.
Configuration menu - View commit details
-
Copy full SHA for ee4c29d - Browse repository at this point
Copy the full SHA ee4c29dView commit details
Commits on Jan 14, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 7c9eec1 - Browse repository at this point
Copy the full SHA 7c9eec1View commit details
Commits on Jan 15, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 9d1869d - Browse repository at this point
Copy the full SHA 9d1869dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2764cd2 - Browse repository at this point
Copy the full SHA 2764cd2View commit details
Commits on Jan 17, 2023
-
Configuration menu - View commit details
-
Copy full SHA for c31ea80 - Browse repository at this point
Copy the full SHA c31ea80View commit details -
👌 Change missing directive/role errors to warnings (#687)
If an unknown directive/role name is encountered, then a warning is emitted with the `myst.directive_unknown` or `myst.role_unknown` type, which can be suppressed.
Configuration menu - View commit details
-
Copy full SHA for 84c320b - Browse repository at this point
Copy the full SHA 84c320bView commit details
Commits on Feb 11, 2023
-
✨ NEW: extended URL link customisation (#695)
The `myst_url_schemes` configuration has been extended, in a back-compatible manner, to also allow writing as a dictionary, with customisations of the link URL/text, via templates, such as: ```python myst_url_schemes = { "http": None, "https": None, "wiki": "https://en.wikipedia.org/wiki/{{path}}#{{fragment}}", "gh-issue": { "url": "https://github.com/executablebooks/MyST-Parser/issue/{{path}}#{{fragment}}", "title": "Issue #{{path}}", "classes": ["github"], }, } ``` Allowing for `<gh-issue:639>` and `[URI](wiki:Uniform_Resource_Identifier#URI_references)`. The `inline_attrs` extension also allows for specific links to be marked as external, using `[](my-link){.external}`.
Configuration menu - View commit details
-
Copy full SHA for 879cfca - Browse repository at this point
Copy the full SHA 879cfcaView commit details -
👌 IMPROVE: Allow heading_slug_func to be a string (#696)
`myst_heading_slug_func` can now also be set to a string, which will be interpreted as an import path to a function, e.g. `myst_heading_slug_func = "mypackage.mymodule.slugify"`.
Configuration menu - View commit details
-
Copy full SHA for d743992 - Browse repository at this point
Copy the full SHA d743992View commit details -
⬆️ Update pre-commit requirement from ~=2.12 to ~=3.0 (#693)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Chris Sewell <chrisj_sewell@hotmail.com>
Configuration menu - View commit details
-
Copy full SHA for 6e32143 - Browse repository at this point
Copy the full SHA 6e32143View commit details
Commits on Feb 19, 2023
-
✨ NEW: Add
attrs_block
extension (#703)By adding `"attrs_block"` to `myst_enable_extensions` (in the sphinx `conf.py`), you can enable parsing of inline attributes after certain inline syntaxes. This is adapted from [djot block attributes](https://htmlpreview.github.io/?https://github.com/jgm/djot/blob/master/doc/syntax.html#block-attributes)
Configuration menu - View commit details
-
Copy full SHA for cce4684 - Browse repository at this point
Copy the full SHA cce4684View commit details -
📚 DOCS: Use
sphinx-autodoc2
for API (#704)This will allow moving source docstrings to use MyST instead of rST 🎉
Configuration menu - View commit details
-
Copy full SHA for fc59f3b - Browse repository at this point
Copy the full SHA fc59f3bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 41a5061 - Browse repository at this point
Copy the full SHA 41a5061View commit details
Commits on Feb 20, 2023
-
👌 IMPROVE: Allow setting {#id} on headings (#706)
For use with the `attrs_block` extension. This just moves around the logic for implicit heading anchors a bit (without changing anything user facing), to allow distinguishing between explicit and implicit heading ids.
Configuration menu - View commit details
-
Copy full SHA for c8b6fc3 - Browse repository at this point
Copy the full SHA c8b6fc3View commit details -
Minor fix to stop the hover tips getting heading numbers
Configuration menu - View commit details
-
Copy full SHA for f02d40f - Browse repository at this point
Copy the full SHA f02d40fView commit details
Commits on Feb 21, 2023
-
👌 Enhance
[](#id)
references (#707)This PR moves myst-parser in the direction of jupyter-book/myst-enhancement-proposals#10, in a relatively back compatible manner, and in a way that supports both docutils and sphinx. It expands the capability of `[](#id)` to more than just linking to heading slugs, with the order of specificity being: 1. If it matches a local (to that document) "explicit" `std:ref` target, then link to that and stop - Note, currently only `std:ref` domain/type are supported, e.g. not `math` etc. That's more difficult and can come later 2. If it matches a local (to that document) "implicit" heading slug, then link to that and stop 3. If using docutils (i.e. single-page) build, then stop here and emit a `myst.xref_missing` warning 4. If using sphinx then create a `pending_xref` node, and hand-off to sphinx's "any" resolver, which takes effect once all documents have been read: - This first tries to resolve against a local (to the project) reference and, if matching, stops - Otherwise also try to match against any intersphinx reference - Otherwise emit a ~~`myst.ref`~~ `myst.xref_missing` warning If the text is explicit, e.g. `[text](#id)`, that text is used, otherwise a determination of implicit text is attempted, e.g. based on the section title or figure caption.
Configuration menu - View commit details
-
Copy full SHA for 1096e52 - Browse repository at this point
Copy the full SHA 1096e52View commit details -
👌 Handling of nested headers (#711)
For the longest time, nested headers in myst-parser have been a pain, particularly in things like admonitions In Markdown (and HTML) headings are allowed "anywhere", for example: ```markdown > # Heading 1 ## Heading 2 Paragraph ``` Is rendered as: ```html <blockquote> <h1>Heading 1</h1> </blockquote> <h2>Heading 2</h2> <p>Paragraph</p> ``` However, because docutils/sphinx treats headers as nested sections, this becomes problematic ```xml <blockquote> <section> <title> Heading 1 <section> <title> Heading 2 <paragraph> Paragraph ``` Which sphinx cannot resolve the ToC tree from etc This PR fixes this, by identifying if a heading is inside another component and instead outputting it as a "non-structural" rubric node ```xml <blockquote> <rubric level=1> Heading 1 <section> <title> Heading 2 <paragraph> Paragraph ``` Natively, docutils/sphinx does not deal with the "level" key in the rubric, so here we also override the rubric HTML renderer to correctly output a `<h>` element, if "level" is present, to retrieve the desired: ```html <blockquote> <h1>Heading 1</h1> </blockquote> <h2>Heading 2</h2> <p>Paragraph</p> ``` There is no longer any warning of nested headers, since this is the intended behaviour To clarify, the logic is now: - A section can only be a child of the root document, or another section - If a header token is encountered, with a child that is not one of these, then it is added as a rubric - Otherwise a new section is created, and the heading is added as a title, which is a child of the section
Configuration menu - View commit details
-
Copy full SHA for ac111ea - Browse repository at this point
Copy the full SHA ac111eaView commit details -
👌 Improve: Non-directive colon-fences (#713)
At present, colon fences without a directive specified (e.g. `:::{note}`) are treated as code bocks ``` :::name Some text ::: ``` ```xml <code language=name> Some text ``` In keeping with the purpose of these block, as containers for nested MyST content, they are now converted to: ```xml <div class=name> <paragraph> Some text ``` This is also in keeping with the original pandoc/djot inspiration <https://htmlpreview.github.io/?https://github.com/jgm/djot/blob/master/doc/syntax.html#div>
Configuration menu - View commit details
-
Copy full SHA for 6b3fc19 - Browse repository at this point
Copy the full SHA 6b3fc19View commit details -
🐛 FIX: colon_fence wrapping (#714)
Minor fix to the last commit 😅
Configuration menu - View commit details
-
Copy full SHA for 4cac732 - Browse repository at this point
Copy the full SHA 4cac732View commit details
Commits on Feb 22, 2023
-
🐛 FIX encoded URL ID references (#715)
For example `<#name with spaces>` will be encoded as `#name%20with%20spaces`, so we need to decode before resolving the reference.
Configuration menu - View commit details
-
Copy full SHA for 2902e07 - Browse repository at this point
Copy the full SHA 2902e07View commit details -
👌 Improve
[](#target)
resolution warnings (#716)Previously, if `[](#target)` matched nothing locally, but multiple items in intersphinx inventories, then no warning would be logged, and the first match silently used. Resolution of intersphinx now proceeds (if no local matches found) the same as for `[](inv:#target)`, such that a `myst.iref_ambiguous` warning is emitted in this case (the first match is then still used). Warnings coming from resolution of `[](#target)` can also now be "individually" turned off using https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-nitpick_ignore, e.g. `nitpick_ignore = [("myst", "target")]`
Configuration menu - View commit details
-
Copy full SHA for 7ecf1bb - Browse repository at this point
Copy the full SHA 7ecf1bbView commit details
Commits on Feb 23, 2023
-
👌 Improve: Apply implicit targets to nested headings (#718)
This commit builds on ac111ea, to allow for implicit heading slugs to be applied also to nested headings, i.e. so they can be referenced in Markdown links
Configuration menu - View commit details
-
Copy full SHA for 7fe6411 - Browse repository at this point
Copy the full SHA 7fe6411View commit details -
✨ New: add .glossary for attrs_block (#719)
MyST follows Pandoc definition-lists, to denote lists of term -> definition. ```markdown Term 1 : Definition Term 2 : Definition ``` It should be easy for users to turn one of these lists into a glossary, where each term is uniquely referenceable across the entire project. This commit, allows this, via adding a `.glossary` class to the list: ```` {.glossary} Term 1 : Definition Term 2 : Definition ````
Configuration menu - View commit details
-
Copy full SHA for 7692f87 - Browse repository at this point
Copy the full SHA 7692f87View commit details
Commits on Mar 1, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 1bd0def - Browse repository at this point
Copy the full SHA 1bd0defView commit details -
Configuration menu - View commit details
-
Copy full SHA for f791cea - Browse repository at this point
Copy the full SHA f791ceaView commit details -
Configuration menu - View commit details
-
Copy full SHA for de00c89 - Browse repository at this point
Copy the full SHA de00c89View commit details -
Configuration menu - View commit details
-
Copy full SHA for 37a830d - Browse repository at this point
Copy the full SHA 37a830dView commit details
There are no files selected for viewing