Marked hangs on a specific text
// 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:
- Crate a markdown file with the contents above or take the attached one
- Open it with Marked
- !!!
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
- New_Markdown_Text_14.md 902 Bytes
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
Support Staff 1 Posted by Brett on 26 Apr, 2025 12:03 AM
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 Posted by Sergey Skobliko... on 26 Apr, 2025 01:24 AM
Correct. TOC in a fenced code block.
Support Staff 3 Posted by Brett on 26 Apr, 2025 09:57 AM
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.
Support Staff 4 Posted by Brett on 26 Apr, 2025 03:02 PM
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.
Support Staff 5 Posted by Brett on 26 Apr, 2025 03:55 PM
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.
Brett closed this discussion on 26 Apr, 2025 03:55 PM.
Serhii Skoblikov re-opened this discussion on 27 Apr, 2025 08:19 PM
6 Posted by Serhii Skobliko... on 27 Apr, 2025 08:19 PM
Thank you for the fast and involved response! I do appreciate it.