Repository navigation
fix: start code lines with a partially consumed tab in their own source line (DEV-3358) - #24
Merged
Merged
Conversation
…ce line (DEV-3358)
Author
|
14.2.0 的 release date 要麻煩 @Yukaii commit 了 |
Coverage Report for CI Build 44255971129Coverage remained the same at 99.336%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats💛 - Coveralls |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Yukaii
force-pushed
the
fix/dev-3358-src-line-starts
branch
from
November 18, 2026 07:03
4033c31 to
b8ee496
Compare
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.
Fixes the P2 item from DEV-3267: with tabs,
meta.srcLineStartsonfenceandcode_blockwas not always a real line start (>\t\tfoogave[-1]; in- a\n\n ```\n\tfoo\n ```the start pointed into the previous line).Changes
srcLineStarts[k]is now always the source offset of the first character of linek. WithS = srcLineStarts[k],z = indentZwsp[k],p = srcLinePads[k]andt = S + 1ifp > 0 && z === 0, elset = S + z:c < z) →S + cc < z + p) → the tab, att - 1t + c - z - pS + c)assertRealLineStarts(non-negative, increasing, first character maps back, never crosses a newline) runs on every code test, including the 400 random cases, plus a regression test.This changes the meaning of a published field, so it should go out as 14.2.0. hackmd-production's
codeSourceMap.tsmust be updated in the same release; updating only one side makes positions worse than today.CHANGELOG
The second commit splits
[14.2.0] - Unreleased, most of which already shipped:lib/with git: 14.1.1 =3887153, 14.1.2 =e5437e7, 14.1.3 =cdc762f(fix: accurate source positions in containers and code blocks #22).text_joinjoin condition,getLineOffset(state, line), and theStateInlineline API.[14.2.0]keeps only this fix. The bump-version workflow doesn't touch the CHANGELOG, so set its date when releasing.Test
npm test: 1620 passing, lint and build pass.🤖 Generated with Claude Code