Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support CommonMark syntax #253

Open
xgouchet opened this issue Jan 23, 2017 · 8 comments
Open

Support CommonMark syntax #253

xgouchet opened this issue Jan 23, 2017 · 8 comments

Comments

@xgouchet
Copy link
Member

Currently ReText gives the option to use Markdown, Textile and reStructured Text. It would be great to be compliant with CommonMark (which is a kind of standardized version of Markdown)

@mitya57
Copy link
Member

mitya57 commented Jan 23, 2017

Out of curiosity: what the the syntax features that are present in CommonMark that you miss with the current implementation? I am quite sure there are Python-Markdown extensions that implement the syntax you need.

That said, I can add the CommonMark markup, but I am not going to reassign the standard file extensions (.mkd, .md, .markdown) to it, so all current files will still load using Python-Markdown.

@xgouchet
Copy link
Member Author

It's not so much mssing syntax feature, rather than having a standard syntax across several systems.

There are lots of different markdown flavor, based on website and parsers, and CommonMark actually have a spec on how to write syntax.

I understand the problem with the file extension, maybe you could add a user preference to choose between python markdown / common mark ?

@keesse
Copy link

keesse commented Feb 11, 2017

I agree with xgouchet, that would be nice, a lot of other applications also support both.
E.g. a '\' instead of ' ' at the end of a line is more visable (allthough ReText prints grey spaces, not all other editors do).

@lofidevops
Copy link

Some additional comments (just putting these links here for reference):

@matkoniecz
Copy link

Out of curiosity: what the the syntax features that are present in CommonMark that you miss with the current implementation? I am quite sure there are Python-Markdown extensions that implement the syntax you need.

In some cases CommonsMark and ReText gives different rendering, so I need to make changes like colouring-cities/colouring-core@b07de22 just because ReText is displaying it brokenly.

Specifically:

This repository will contain open-source code for the project which:
- stores building footprint polygons and source metadata
- allows site users to record building attribute data

is shown as list on GitHub that is using CommonsMark and not in ReText that is using MarkDown.

https://johnmacfarlane.net/babelmark2/?text=This+repository+will+contain+open-source+code+for+the+project+which%3A%0A-+stores+building+footprint+polygons+and+source+metadata%0A-+allows+site+users+to+record+building+attribute+data

screen

@mitya57
Copy link
Member

mitya57 commented Nov 5, 2021

As I said earlier,

I am quite sure there are Python-Markdown extensions that implement the syntax you need.

And here is an extension for your case:

https://github.com/adamb70/mdx-breakless-lists

@matkoniecz
Copy link

@mitya57 How one may use them in ReText? I see no obvious way to achieve this.

@mitya57
Copy link
Member

mitya57 commented Nov 5, 2021

There are multiple ways to enable extensions, as described in the wiki: https://github.com/retext-project/retext/wiki/Markdown-extensions.

  • Directly in document by adding <!-- Required extensions: mdx_breakless_lists --> as first line.
  • markdown-extensions.txt or markdown-extensions.yaml in the document directory.
  • markdown-extensions.txt or markdown-extensions.yaml in your user ~/.config.

And of course you need to install the extension, in this case pip3 install mdx-breakless-lists.

Screenshot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants