Skip to content

fix: \left\| and \right\| draw double bars - #3115

Open
shupphar wants to merge 1 commit into
arnog:masterfrom
shupphar:fix-double-bar-delimiter
Open

shupphar wants to merge 1 commit into
arnog:masterfrom
shupphar:fix-double-bar-delimiter

Conversation

@shupphar

Copy link
Copy Markdown

\left\| x \right\| is drawn with single bars, though \| is a double vertical bar, as \Vert is.

Cause. The small-delimiter table in src/core/delimiters.ts maps \| to U+2223 (DIVIDES), a single bar. The stacked (large) delimiter path already maps it to U+2225, so only short contents, which use a small delimiter, were wrong.

Fix. Map \| to U+2225, as \Vert, \lVert, \rVert and \mVert already are.

Tests. A new DOUBLE BAR DELIMITER block in test/markup.test.ts checks that \left\| … \right\| draws exactly what \left\Vert … \right\Vert draws, small and large. The LEFT/RIGHT › Delimiters \| | snapshot recorded the single bar and is updated: its only change is ∣ → ∥ on the opening delimiter.

Suggested changelog line: \left\| and \right\| are drawn as double bars, as \left\Vert is.

🤖 Generated with Claude Code

`\|` is a double vertical bar, as `\Vert` is. The large (stacked) delimiter
already drew it so, but the small delimiter table mapped `\|` to U+2223
(DIVIDES), a single bar, so `\left\| x \right\|` drew single bars around
anything short enough to use a small delimiter. It now maps to U+2225, as
`\Vert` does. The LEFT/RIGHT snapshot that recorded the single bar is updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant