Tables problems - [ and \ characters cause table to mis-form

peter2536's Avatar

peter2536

22 Mar, 2019 01:05 AM

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

Some characters cause tables to loose formatting. “[“ and “\” seem to be the two.

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

  1. See the attached sample file
  2. ByWord produces the same problem
  3. Typora DOES NOT have this problem
  4. StackEdit ( https://stackedit.io ) DOES NOT have this problem
  5. It might be that Marked2 is being confused by the "matching" "[" and "]" characters several lines apart!
  6. Is there an escape character that could be put before the square bracket characters?

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

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

macOS Version: 10.14.3

additionalMathJaxConfig:
allowPageBreakInCode: YES
bookTxtIsLeanpub: NO
summaryMdIsGitBook: NO
codeIsPoetry: NO
codeCanWrap: YES
collapsibleHeadlines: NO
convertGithubCheckboxes: YES
convertYAMLToMMD: NO
defaultMathJaxConfig: TeX-AMS-MML_HTMLorMML
defaultPreviewStyle: 101
defaultProcessor: MultiMarkdown
enableMiniMap: NO
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
limitTextWidth: NO
minimalJavaScript: NO
outlineModeExtensions:
permissionGranted: NO
printHeaderBottomLeft:
printHeaderBottomRight:
printHeaderFirstPage: NO
printFooterFirstPage: NO
printHeaderTopLeft:
printHeaderTopRight:
processHTMLFiles: YES
removeMetadataForPreview: NO
removeYAMLHeaders: NO
scrollToEdit: YES
shouldDetectCritic: YES
shouldHighlightMarkupErrors: NO
shouldLoadCritic: NO
syntaxHighlight: NO
syntaxHighlightOnlyLang: NO

  1. 1 Posted by peter2536 on 22 Mar, 2019 01:51 AM

    peter2536's Avatar

    It is the problem with the [ … ] bracing brackets.

    This code "fixes" the problem:

    | Option + Shift + L sq brkt | ” | Right Double Quote | | Option + Shift + \ | » | Double Right Angle Quotation Mark | | Option + Shift + R sq brkt | ’ | Right Single Quote |

    But is there a better fix?

    Regards,
    Peter

  2. Support Staff 2 Posted by Brett on 22 Mar, 2019 01:06 PM

    Brett's Avatar

    The \ and [] hold special meaning in Markdown, and the MultiMarkdown processor v5 that Marked uses is misinterpreting your intentions. The trick is to escape the characters (which happens to use the backslash):

    | Option + \[             | “      | Left Double Quote                                              |
    | Option + \\             | «      | Double Left Angle Quotation Mark                               |
    | Option + \]             | ‘      | Apostrophe or Left Single Quote                                |
    

    Should fix the issue for you. Note that the backslash character itself is doubled, which is basically forcing a backslash. It wasn't the issue with this table, but it's a good idea to be safe.

    By the way, the Discount (GFM) processor option handles this better than the MMD processor, requiring no adjustments to your original table. Just as an option.

    -Brett

  3. 3 Posted by peter2536 on 22 Mar, 2019 01:27 PM

    peter2536's Avatar

    Brett,

    Thanks for the really quick reply. It's just after midnight her in Oz so I'll try you fix in the morning.

    Can I ask, what is the "Discount (GFM) processor option"?

    Regards,
    Peter

  4. Support Staff 4 Posted by Brett on 22 Mar, 2019 02:04 PM

    Brett's Avatar

    Under Preferences->Processor you can change the way Marked interprets
    Markdown. It uses an entirely separate method of rendering, closer to
    Github Flavored Markdown (GFM). Every "flavor" of Markdown has different
    capabilities, so some things work in one place and not in others. Or
    work better in one, anyway :).

    -Brett

  5. 5 Posted by peter2536 on 22 Mar, 2019 02:12 PM

    peter2536's Avatar

    Brett,

    Thank you for that.

    And thank you for your great app!

    Regards,
    Peter

    PS: I've just been testing your fix on my iPad with 1Writer and Editorial. Works fine!

  6. 6 Posted by peter2536 on 23 Mar, 2019 03:15 AM

    peter2536's Avatar

    Brett,

    It's all working fine thank you!

    Regards,
    Peter

Reply to this discussion

Internal reply

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

Attaching KB article:

»

Already uploaded files

  • Table_problem_2.md 9.4 KB
  • Table_problem.csv 3.79 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

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