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

Docs and examples for all Markdown tags #278

Open
Hvass-Labs opened this issue Jun 2, 2023 · 3 comments
Open

Docs and examples for all Markdown tags #278

Hvass-Labs opened this issue Jun 2, 2023 · 3 comments
Labels
documentation Improvements or additions to documentation

Comments

@Hvass-Labs
Copy link

Context

The function get_all_rules() lists a large number of Markdown rules that can be enabled / disabled. But I can't seem to find a list of these in the docs. It would be very helpful if the docs give examples of the corresponding Markdown tags and what they look like when rendered to HTML.

I also wonder if some of these rules have options e.g. if the heading rule can enable/disable only some of the heading-types?

Thanks!

Proposal

No response

Tasks and updates

No response

@Hvass-Labs Hvass-Labs added the enhancement New feature or request label Jun 2, 2023
@chrisjsewell chrisjsewell added documentation Improvements or additions to documentation and removed enhancement New feature or request labels Jun 5, 2023
@chrisjsewell
Copy link
Member

Heya, well PRs to the documentation are always welcome 😄

It would probably go in https://markdown-it-py.readthedocs.io/en/latest/using.html#the-parser,

if the heading rule can enable/disable only some of the heading-types?

Not sure what you mean by types: heading refers to https://spec.commonmark.org/0.30/#atx-headings, and lheading refers to https://spec.commonmark.org/0.30/#setext-headings

@chrisjsewell
Copy link
Member

chrisjsewell commented Jun 5, 2023

Note, most of the rules behaviour are essentially "documented" via the fixture tests, e.g. for smartquotes https://github.com/executablebooks/markdown-it-py/blob/615eb3f36ceb05f316d1e7920249d45685f8f316/tests/test_port/fixtures/smartquotes.md (click on raw to see the expected HTML)

@Hvass-Labs
Copy link
Author

I mean this as a friendly response, but it is perhaps not so realistic to expect outsiders to write your docs :-) We all have a lot of work to do, and it would take other people a disproportionate amount of time to understand your code in order to be able to document it properly. Instead allow me to elaborate on what I would find useful in your docs:

You already have a list in this section with the output from get_all_rules(), but not an explanation of what they do. It would be very helpful if you simply make a list of all these rules, their corresponding markdown tags, short examples, and links to the Markdown specs for a full explanation. Then it is much easier to enable / disable the Markdown rules we need.

I took a look at the file smartquotes.md you linked to, but I have no idea what that is :-)

Regarding heading "types" I mean levels.

Thanks!

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

No branches or pull requests

2 participants