diff --git a/CHANGELOG.md b/CHANGELOG.md index d49d8c5..ae80a10 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ instead of version numbers. ## 2023-12-14 * Copy/pasting a URL from a message no longer adds extraneous zero-width spaces +* `\verb|$|` now works inside math mode ## 2023-12-05 diff --git a/lib/formats.coffee b/lib/formats.coffee index 280c629..11cc57c 100644 --- a/lib/formats.coffee +++ b/lib/formats.coffee @@ -33,7 +33,7 @@ escapeForQuotedHTML = (s) -> replaceMathBlocks = (text, replacer) -> #console.log text blocks = [] - re = /[{}]|\$\$?|\\(begin|end)\s*{((?:equation|eqnarray|align|alignat|gather|CD)\*?)}|(\\par(?![a-zA-Z])|\n[ \f\r\t\v]*\n\s*)|\\./g + re = /[{}]|\$\$?|\\(begin|end)\s*{((?:equation|eqnarray|align|alignat|gather|CD)\*?)}|(\\par(?![a-zA-Z])|\n[ \f\r\t\v]*\n\s*)|\\verb(.).*?\4|\\./g block = null startBlock = (b) -> block = b