Bug report: `a == b` breaks rendering

Viewed 12

Description of Issue

When Render ==highlight== and ~~delete~~ is checked, Marked 2's rendering is wrong when the double-equals == exists within backticks, such as: a == b.

image.png

Steps required to reproduce the issue

  1. In setting, check Render ==highlight== and ~~delete~~

  2. Render a document with something like this:

Math tells us if `a == b` and `b == c` then `a == c`.

Configuration

Marked 2 1071 (Mac App Store)
macOS Version: 15.7.3
---
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: 3
defaultProcessor: Discount (GFM)
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
includeKatex: NO
limitTextWidth: NO
mathNumberEquations: NO
mathNumberEquationsSide: 0
mathNumberEquationsAMSOnly: 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: YES
syntaxHighlightOnlyLang: NO
useCustomMarkdownProcessor: NO
customMarkdownProcessor: 
useCustomPreprocessor: NO
customPreprocessor: 
useFirstH1AsPrintTitle: YES
Here is some text *above* the problematic area.

Math tells us if `a == b` and `b == c` then `a == c`.

Here is some text *below* the problematic area.

image.png

1 Answers

This is fixed in Marked 3. I may backport the fix to Marked 2 eventually, but all of my effort is going into v3 right now. If you'd like to test, please join the beta! https://markedapp.com/join-the-beta