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.

Support for Admonition syntax (non-standard)

See original GitHub issue

Please add support for Admonitions!

https://python-markdown.github.io/extensions/admonition/

Admonitions are created using the following syntax:

!!! type "optional explicit title within double quotes"
    Any number of other indented markdown elements.

    This is the second paragraph.

Since I am a mkdocs-material user, it would be really great to have this. Even in a previewer in vscode admonitions are displayed.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:14 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
DavidAnsoncommented, Dec 11, 2019

The CLI does not currently support markdown-it plugins.

1reaction
miffelscommented, Jan 24, 2020

@berot3 @Stanzilla did any of you have luck with what David proposed? I just tried hacking the plugin into the markdownlint-cli options passed to markdownlint, but it doesn’t seem to do anything - markdownlint still interprets paragraphs in admonition as indented code blocks:

!!! note
    This is a note

    Second paragraph, which markdownlint reports as code block :(

@DavidAnson just to confirm - below is what you have been proposing, right?

const markdownItAdmonition = require('markdown-it-admonition');
// ...
// https://github.com/igorshubovych/markdownlint-cli/blob/master/markdownlint.js#L237
const markdownItPlugins = [[markdownItAdmonition]];
  const lintOptions = {
    config,
    customRules,
    files,
    markdownItPlugins
  };
// ...
const lintResult = markdownlint.sync(lintOptions);

If we can get this to work, I’d consider making a PR to have this supported in markdownlint-cli.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Admonitions - Material for MkDocs
Each of the supported admonition types has a distinct icon, ... Admonitions follow a simple syntax: a block starts with !!! , followed...
Read more >
reStructuredText Directives - Docutils
This document describes the directives implemented in the reference reStructuredText parser. Directives have the following syntax:
Read more >
Markdown reference for Microsoft Learn - Contributor guide
Markdown is a lightweight markup language with plain text formatting syntax. The Microsoft Learn platform supports CommonMark compliant ...
Read more >
Adding HTML attributes to a multi-line section of markdown
markdown=1. The mention of "the markdown attribute" above is referring to a non-standard add-on to the Markdown syntax which Kramdown supports ...
Read more >
The reason why there are just so many tool around… - types.pl
All off these options involve a bunch of nonstandard, incompatible syntax bolted ... The biggest offender to me though so far is GitHub's...
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