Repository navigation
v1.10.4: fix "~" striking text through in AI answers and EVAL.md - #15
Merged
Merged
Conversation
Claude writes "~" to mean "about", but marked's GFM mode strikes
through text between two single tildes: "~3-5% (~$150-245)" showed
"3-5% (" crossed out in the AI tab (Luis's screenshot, 2026-10-26).
The bug was already on master.
- core.js: a del tokenizer override keeps a single ~ as text; ~~double~~
is still strikethrough (marked's own rule). Applies to every
renderMarkdown() caller: AI tab, AI Eval answers, Changelog view.
- views-eval.js: EVAL.md excerpt cells escape ~ (quote()), since
GitHub has the same single-tilde rule; docs/EVAL.md regenerated from
the same results, only ~ -> \~ changed (16 GitHub strikethroughs ->
0). Archived reports stay as published.
- v1.10.4; CLAUDE.md §8, §13, §21
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QiRz5pTW83oqNbk2NC7yMR
This was referenced Oct 26, 2026
gitluis
commented
Nov 2, 2026
gitluis
left a comment
Owner
Author
There was a problem hiding this comment.
Fully reviewed. PR is approved.
44 tasks
gitluis
pushed a commit
that referenced
this pull request
Nov 2, 2026
…ettings-database-tab Carries master's v1.10.3-v1.10.5 up the stack: declined answers (#14), literal single "~" (#15) and the Import Logs race fix (#18), with clarity-insights' port of #14 to the rebuilt AI tab. One conflict: CLAUDE.md's "Last updated" line. Kept this branch's line and added the v1.10.3-v1.10.5 history. The CHANGELOG merged cleanly. Versions stay 1.17.0. renderImportLog() keeps #18's guards. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013Z8iBXzUjiQbYziDZ8CZft
33 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
AI answers no longer show crossed-out text where Claude wrote "~" for "about". Found in Luis's screenshot of the AI tab on 2026-10-26; the bug was already on
master.Cause
renderMarkdown()uses marked in GFM mode, which treats text between two single tildes as strikethrough, not only~~double~~. Claude often writes~to mean "about", so two approximations on one line can pair up:~3-5% (~$150-245)3-5% ($150-245)~$470/mo, ~9.6% of income (~$516 …$470/mo, ~9.6% of income ($516 …GitHub uses the same rule, so
docs/EVAL.mdhad the same problem in its excerpts: 16 passages showed crossed out when viewed on GitHub.What changed
js/core.jsdeltokenizer override next torenderMarkdown(): a single~is kept as text.~~double~~still means strikethrough: for those, the override returnsfalse, which hands them to marked's own rule.renderMarkdown()caller (AI tab, AI Eval answers, Changelog view). Nothing else about the rendering or sanitizing changes.js/views-eval.js~as\~(quote()), which GitHub shows as a plain tilde. Code spans still usepipe(), since\~would show literally there.docs/EVAL.mdeval-results.json. The only change is~→\~in 115 excerpt lines; the numbers and the hand-written sections are unchanged.docs/eval-runs/are kept as published, so they still show the crossed-out passages on GitHub.index.html, README andviews-settings.js. CLAUDE.md §8, §13 (single~is literal) and §21 (excerpts escape~).How it was tested
Headless Chromium with the pinned marked 15.0.12 and DOMPurify 3.4.17, on
73e5b08.renderMarkdown(), 11/11:~single~pair all render with no strikethrough;~~double~~still strikes through, including with an approximation inside;~~stays literal, and code spans are untouched;<img onerror>is still stripped;docs/EVAL.md: checked with GitHub's own renderer (cmark-gfm). Before, it had 16 strikethroughs; after, 0, with no stray\~showing. Every changed line differs only by~→\~.Not verified: a real answer in your browser. That's the first check below.
Please check before merging
~3-5% (~$150-245), with nothing crossed out.docs/EVAL.mdon GitHub, in this PR's branch, and scroll through the excerpt tables: tildes show as "~", not crossed out.Generated by Claude Code