ATX-style heading not rendered if text is enclosed in square brackets

David Passarelli's Avatar

David Passarelli

13 Sep, 2021 08:45 PM

// Please enter a detailed description of the issue // Description of the issue:

When creating an ATX-style heading, if the header text is enclosed inside of square brackets, then the heading is not rendered correctly. The hash marks are displayed as-is.

// Please enter a list of steps required to reproduce the issue // Steps to reproduce:

  1. Create an ATX-style heading.
  2. Add text on the same line, with a single space between the hash marks and the words. Notice that Marked renders the heading as expected.
  3. Enclose the text inside of square brackets. Notice that Marked no longer renders this line as a heading, and the hash marks are now visible.

// If applicable please attach a sample document that causes the issue for you.

// Configuration (do not edit) Marked 2 1022 (Mac App Store)

macOS Version: 11.5.1

allowPageBreakInCode: YES
bookTxtIsLeanpub: NO
summaryMdIsGitBook: NO
codeIsPoetry: NO
codeCanWrap: YES
collapsibleHeadlines: NO
convertGithubCheckboxes: YES
convertGithubEmoji: YES
convertYAMLToMMD: NO
defaultMathJaxConfig: TeX-AMS-MML_HTMLorMML
defaultPreviewStyle: 3
defaultProcessor: MultiMarkdown
enableMiniMap: YES
excludeBlockQuotesFromCounts: NO
excludeFootnotesFromCounts: NO
excludeVerbatimFromCounts: NO
excludeCaptionsFromCounts: NO
folderPreviewExtensionsArray: md, markdown, txt, mdown, html, opml
githubNewlines: YES
h1IsPageBreak: NO
h2IsPageBreak: NO
hrIsPageBreak: NO
includeMathJax: NO
includeKatex: NO
limitTextWidth: NO
mathNumberEquations: NO
mathNumberEquationsSide: 0
mathNumberEquationsAMSOnly: NO
minimalJavaScript: NO
permissionGranted: NO
printHeaderFirstPage: NO
printFooterFirstPage: NO
processHTMLFiles: YES
removeMetadataForPreview: NO
removeYAMLHeaders: NO
scrollToEdit: YES
shouldDetectCritic: YES
shouldHighlightMarkupErrors: NO
shouldLoadCritic: NO
syntaxHighlight: YES
syntaxHighlightOnlyLang: NO
useCustomMarkdownProcessor: NO
useCustomPreprocessor: NO
useFirstH1AsPrintTitle: YES

  1. Support Staff 1 Posted by Brett on 13 Sep, 2021 09:00 PM

    Brett's Avatar

    MultiMarkdown interprets square brackets in headers as a way to force ids. Switch to the  Discount processor and you’ll see the difference.

    - Brett

  2. 2 Posted by David Passarell... on 13 Sep, 2021 09:19 PM

    David Passarelli's Avatar

    Ah, cool. So I did that...and now I see a single hash mark, rendered as a heading. lol
    (see attached)

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Already uploaded files

  • 299 Bytes
  • Screen_Shot_2021-09-13_at_4.27.46_PM.png 317 KB

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac