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.

MD030 in admonitions

See original GitHub issue

MD030 currently doesn’t apply to indented lists (ol / ul).

Based on this config:

# Default state for all rules
default: true

# MD003/heading-style/header-style - Heading style
MD003:
  # Heading style
  style: atx
#
# MD004/ul-style - Unordered list style
MD004:
  # List style
  style: sublist
#
# MD007/ul-indent - Unordered list indentation
MD007:
  # Spaces for indent
  indent: 4

# MD010/no-hard-tabs - Hard tabs
MD010:
  # Include code blocks
  code_blocks: true
  # Number of spaces for each hard tab
  spaces_per_tab: 4

# Disable line length check for tables and code blocks
# MD013/line-length - Line length
MD013:
  # Include code blocks
  code_blocks: false
  # Include tables
  tables: false

# MD029/ol-prefix - Ordered list item prefix
MD029:
  # List style
  style: ordered

# MD030/list-marker-space - Spaces after list markers
MD030:
  # Spaces for single-line unordered list items
  ul_single: 3
  # Spaces for single-line ordered list items
  ol_single: 2
  # Spaces for multi-line unordered list items
  ul_multi: 3
  # Spaces for multi-line ordered list items
  ol_multi: 2

# MD033/no-inline-html - Inline HTML
MD033:
  # Allowed elements
  allowed_elements: [br]

# MD046/code-block-style - Code block style
# conflicting with admonitions...
MD046: false

# MD048/code-fence-style - Code fence style
MD048:
  # Code fence style
  style: backtick

Just look at the errors in

A ul

- def

and a ol ul combination

1. abc
    - cde

vs

!!! note "admonition test as e.g. used / defined in mkdocs material"
    1. abc
        - cde

    or

    - def

and you will notice that only the case outside the admonition displays an error

Tested on

  • markdownlint version 0.30.0
  • installed via node version 16.13.0
  • on Mac 11.6.5

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
DavidAnsoncommented, Mar 28, 2022

(You beat me by 4 seconds, Nick!)

1reaction
DavidAnsoncommented, Mar 28, 2022

See #207 for information about adding recognition of admonitions to the parser via a plug-in. Note that markdoenlint-cli2 supports using parser plug-ins.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Support for Admonition syntax (non-standard) #207 - GitHub
Admonitions are created using the following syntax: !!! type "optional explicit title within double quotes" Any number of other indented markdown elements. This ......
Read more >
Admonitions - Material for MkDocs
Admonitions, also known as call-outs, are an excellent choice for including side content without significantly interrupting the document flow.
Read more >
Admonitions - Docusaurus
Handling admonitions/callouts in Docusaurus Markdown. ... we have a special admonitions syntax by wrapping text with a set of 3 colons, ...
Read more >
MkDocs - Alinex IT Reference & Guide - GitLab
A book to learn everything in the area of web applications.
Read more >
MD030 in admonitions - Issues Antenna
A Node.js style checker and lint tool for Markdown/CommonMark files. DavidAnson. 3510 493 51 513.
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