Markdown table formatting

dgmags's Avatar

dgmags

16 Sep, 2020 09:27 PM

Marked 2 renders the attached Markdown table incorrectly.

It fails to recognize the line that begins with date 2020.09.08 as a new line, instead including it in the "siding" field for the prior record. This is apparently due to the presence of a quotation mark in the "Siding" field for successive records (8/30 and 9/8). If either quotation mark is removed, or if an extra line feed is added to the 8/30 line, the table renders correctly.

I'm not aware of any special setting regarding quotation marks.

  1. Support Staff 1 Posted by Brett on 17 Sep, 2020 08:46 PM

    Brett's Avatar

    I'm not seeing any strange rendering on your example file using either
    of the built-in processors. So first, are you using a custom processor.
    Second, do you have MathJax or KaTeX enabled, and lastly, could you
    include the output of Help->Report an Issue in your response to answer a
    few more of these questions for me?

    Thanks,
    Brett

  2. 2 Posted by dgmags on 17 Sep, 2020 09:23 PM

    dgmags's Avatar

    Sorry, Brett... I thought I'd included the diagnostic report with my
    posting.

    - Default MathJax config is TeX-AMS-MML_HTMLorMML.
    - I've attached my notes (_about_bugReport-20200916.md), which includes the
    diagnostic report.
    - I've also attached the Markdown source file (MarkdownTable.md), and the
    HTML file as rendered by Marked 2 (MarkdownTable.html).

    Hope this provides an answer.

    Regards,

    David Magnuson
    [email blocked]

  3. Support Staff 3 Posted by Brett on 17 Sep, 2020 09:51 PM

    Brett's Avatar

    Ok, so the issue is related to the double quotes, and is the result of
    the option "generate typographically correct quotes and punctuation"
    under Preferences->Style. Disabling this feature fixes the issue. I'm
    unsure why MMD is messing this particular syntax up, will have to look
    into that further.

    -Brett

  4. Support Staff 4 Posted by Brett on 17 Sep, 2020 09:54 PM

    Brett's Avatar

    One other option if you don't want to disable that option is to escape
    the quotes by putting a backslash before them, e.g. 1/2\". Doing this to
    one or both of the offending quotes will break the pairing and fix
    rendering.

    -Brett

  5. 5 Posted by dgmags on 17 Sep, 2020 09:59 PM

    dgmags's Avatar

    Good to know.

    So is this related to MathJax?

    I generally have a sense of when to escape a character in Markdown syntax.
    But a quotation mark didn’t raise a flag for me.

  6. Support Staff 6 Posted by Brett on 17 Sep, 2020 10:24 PM

    Brett's Avatar

    Nope, nothing to do with MathJax (although some of the paired dollar signs in the table may have their own rendering issues). It appears to be related to the "SmartyPants" processing done by MultiMarkdown to convert paired quotes to their "curly" versions (among other things). For some reason it's pairing up quotes across two different lines and then failing to correctly render what's between them. In the case of a foot/inch demarcation it shouldn't be doing anything at all, but something is tripping it up. I'll look into that further, but in the meantime backlash escaping won't hurt anything for the vast majority of markdown processors.

    Thanks,
    Brett

  7. 7 Posted by dgmags on 17 Sep, 2020 11:20 PM

    dgmags's Avatar

    Thanks for the help.

    I enjoy your work.

  8. Brett closed this discussion on 24 Sep, 2020 02:26 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? 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