Marked hangs on a specific text

Serhii Skoblikov's Avatar

Serhii Skoblikov

22 Apr, 2025 06:13 PM

// Please enter a detailed description of the issue // Description of the issue: Markedit hangs while opening a markdown file with the following contents:

Hangs

D-Link DIR 825 B1 Manual..........................................1
 Preface..........................................................2
  Manual Revisions................................................2
 Table of Contents................................................3
  Using Windows Vista.............................................4
 Product Overview.................................................5
  Package Contents................................................5
  System Requirements.............................................6
  Introduction....................................................7
  Features........................................................8
  Hardware Overview...............................................9
  Hardware Overview..............................................10
 Installation....................................................11

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

  1. Crate a markdown file with the contents above or take the attached one
  2. Open it with Marked
  3. !!!

By the looks the app goes into an infinite loop and gobbles up RAM like crazy.

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

// Configuration (do not edit) Marked 2 1071 (Setapp)

macOS Version: 15.4.1

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

  1. Support Staff 1 Posted by Brett on 26 Apr, 2025 12:03 AM

    Brett's Avatar

    That's really odd, but I'm able to replicate it. Just to be clear, the text you're trying to load contains the TOC as a code block, correct?

  2. 2 Posted by Sergey Skobliko... on 26 Apr, 2025 01:24 AM

    Sergey Skoblikov's Avatar

    Correct. TOC in a fenced code block.

  3. Support Staff 3 Posted by Brett on 26 Apr, 2025 09:57 AM

    Brett's Avatar

    It must have something to do with syntax highlighting. The issue goes away when I disable that feature in Style preferences. I'll have to look into it. It doesn't make sense that that code block would cause any issues, so it might take me a bit to figure out the cause.

  4. Support Staff 4 Posted by Brett on 26 Apr, 2025 03:02 PM

    Brett's Avatar

    Ok, yes, this is hanging when highlight.js is invoked. Complete mystery as to why at this point, but looking into it. In the meantime, if you go into Settings->Style and next to the Syntax Highlighting checkbox you'll see "only if language specified." Checking that will avoid running syntax highlighting on this particular block (or any block where you don't add a language after the code fence). This assumes you do want syntax highlighting on other code blocks, otherwise you could just disable completely.

    I'm trying to track down why this is happening today, will update if I figure it out.

  5. Support Staff 5 Posted by Brett on 26 Apr, 2025 03:55 PM

    Brett's Avatar

    Solved the issue just by updating Highlight.js. Not sure what was hanging it, but will publish a release soon that will solve the issue.

  6. Brett closed this discussion on 26 Apr, 2025 03:55 PM.

  7. Serhii Skoblikov re-opened this discussion on 27 Apr, 2025 08:19 PM

  8. 6 Posted by Serhii Skobliko... on 27 Apr, 2025 08:19 PM

    Serhii Skoblikov's Avatar

    Thank you for the fast and involved response! I do appreciate it.

Reply to this discussion

Internal reply

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

Attaching KB article:

»

Already uploaded files

  • New_Markdown_Text_14.md 902 Bytes

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