Skip to content

Fix the extra prompt and the dropped attributes in Command Line examples written in Markdown - #4140

Merged
DmitrySharabin merged 2 commits into
v2from
fix/command-line-final-line-break
Oct 2, 2026
Merged

DmitrySharabin merged 2 commits into
v2from
fix/command-line-final-line-break

Conversation

@DmitrySharabin

Copy link
Copy Markdown
Member
  • A code block ending in a line break, as every Markdown code fence does, got one prompt more than it has lines: browsers draw no line after a final line break in <pre>. The plugin now sets that line break aside while it splits the code into lines, and puts it back. Code without a final line break behaves as before.
  • The Bash continuation example in the docs lost all its attributes: no fence info string can hold data-continuation-str="\", since markdown-it-attrs reads \" as an escaped quote. It is now HTML, like the PowerShell example next to it.
Command Line blocks on the plugin page prompts per block
before 4 4 9 20 none 7 23
after 3 3 8 19 10 7 22 (same as prismjs.com)

test:plugins: 41 pass. Each new test fails without its part of the fix.

🤖 Generated with Claude Code

DmitrySharabin and others added 2 commits October 2, 2026 13:44
- Browsers draw no line after a final line break in <pre>, and every Markdown code fence ends with one

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- No fence info string can hold `data-continuation-str="\"`: markdown-it-attrs reads `\"` as an escaped quote and drops every attribute. The PowerShell example already uses HTML for its backtick

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

netlify Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for dev-prismjs-com ready!

Name Link
🔨 Latest commit 23fa077
🔍 Latest deploy log https://app.netlify.com/projects/dev-prismjs-com/deploys/6abf9937d8835800080a4db9
😎 Deploy Preview https://deploy-preview-4140--dev-prismjs-com.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@DmitrySharabin
DmitrySharabin merged commit e935800 into v2 Oct 2, 2026
12 checks passed
@DmitrySharabin
DmitrySharabin deleted the fix/command-line-final-line-break branch October 2, 2026 11:47
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