question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Decide default configuration for MyST-Parser v0.13

See original GitHub issue

I’m nearly done with myst-parser v0.13.2, with lots of changes/additions to the extension system, as explained in https://github.com/executablebooks/MyST-Parser/blob/master/CHANGELOG.md and outlined in https://myst-parser.readthedocs.io/en/latest/using/syntax-optional.html

We should decide what the default configuration will be (see https://myst-parser.readthedocs.io/en/latest/using/intro.html#sphinx-configuration-options) and how it is utilised in _config.yml, e.g. what extensions should be enabled by default and how additional extensions are enabled.

Currently, only dollarmath is enabled by default, then there is myst_extended_syntax to blanket enable all other extensions. Since it is a list now, it might be easier to just list them all and comment out ones disabled by default, something like:

parse:
  enable_extensions:
    # - amsmath
    # - colon_fence
    - deflist
    - dollarmath
    - html_admonition
    - html_image
    # - linkify
    # - replacements
    - smartquotes
    - substitution
  substitutions: {}
  html_meta: {}
  url_schemes: [mailto, http, https]

Note linkify also requires the additional dependency https://github.com/tsutsu3/linkify-it-py

Also need to decide how to deprecate current keys (primarily myst_extended_syntax)

cc @choldgraf @mmcky @AakashGfude

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
choldgrafcommented, Jan 21, 2021

Actually, another approach we could take is to enable whatever extensions we need in order to get the default “Jupyter Notebook” markdown experience. Since Jupyter Book is jupyter-specific, that seems to be a reasonable assumption. Another guiding principle could be “things that are particularly useful for large, complex books”.

I think this would mean the following extensions:

  • dollarmath (since the notebook supports it)
  • linkify (since the notebook auto-links URLs)
  • substitution (since this is useful for complex books)
  • colon-fence (since it’d improve reading in notebook interfaces)

Anything else? What do @mmcky @jstac @AakashGfude think?

1reaction
fperezcommented, Jan 22, 2021

My 1e-2 - even with @chrisjsewell’s caveats, I think I’d still +1 linkify: parity on that point between the “live” notebook experience and the resulting JB html would be great to have. Our current class notes have a ton of links that have been pasted without “markdown-ifying” them over the years (e.g. here), and it’s annoying to see all that rendered as plain text in a web page 😃

So my vote would be for it, though I appreciate the dependency and potential performance impact - your call!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting Started - MyST-Parser - Read the Docs
By default, Sphinx reads reStructuredText ( .rst ) files. Sphinx uses a parser to parse input files into its own internal document model...
Read more >
myst-parser Changelog - PyUp.io
Remove v0.13 deprecations ‼️ The deprecations made to extension configurations and colon fences in `0.13.0` (see below) have now been removed:
Read more >
Read the Docs Documentation
For that, go to the Advanced Settings link under the Admin menu of your project home, choose stable in the “Default.
Read more >
myst-parser - PyPI
An extended commonmark compliant parser, with bridges to docutils & sphinx.
Read more >
EvalML Documentation
EvalML has many options to configure the pipeline search. At the minimum, we need to ... This is also the default behavior for...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found