-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Closed
Labels
author-verification-requestedIssues potentially verifiable by issue authorIssues potentially verifiable by issue authorbugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable buginsiders-releasedPatch has been released in VS Code InsidersPatch has been released in VS Code InsidersmarkdownMarkdown support issuesMarkdown support issuesverifiedVerification succeededVerification succeeded
Milestone
Description
When rendering Markdown preview, Unicode newline characters U+2028 LINE SEPARATOR and U+2029 PARAGRAPH SEPARATOR are replaced with an empty string at the source preprocessing stage.
This behavior was introduced in #63936 to fix #63749, but it breaks the document in multiple ways:
- double-click word selection does not work as expected,
- screen readers may announce the text incorrectly,
- line wrapping and hyphenation does not work correctly,
- markdown-it plugins that rely on
\bor\smay work incorrectly, - even linkify fails:
https://foo.bar/baz<LS>Lorem ipsum (Expected link: https://foo.bar/baz) (Received link: https://foo.bar/bazLorem) - and so on.
Since then it was fixed at the markdown-it side, and #63936 is no longer needed:
- markdown-it/markdown-it@d9cb3cc
- markdown-it/markdown-it@faecae0
- https://github.com/markdown-it/markdown-it/blob/9.1.0/lib/rules_core/normalize.js
It would be better to revert this change, and keep the Markdown source as is before feeding it to the parser.
Steps to reproduce:
- Create a Markdown document like this:
https://foo.bar/baz Lorem ipsum. Lorem ipsum. https://foo.bar/baz Lorem ipsum. Lorem ipsum.
- Open preview:
- Expected result: LS and PS are displayed as is, links end at Unicode newlines.
- Actual result: no Unicode newline characters displayed, links also consume the immediately following word.
Does this issue occur when all extensions are disabled?: Yes
- VS Code Version:
Version: 1.73.0 (system setup) Commit: 8fa188b2b301d36553cbc9ce1b0a146ccb93351f Date: 2022-11-01T15:34:06.111Z Electron: 19.0.17 Chromium: 102.0.5005.167 Node.js: 16.14.2 V8: 10.2.154.15-electron.0 OS: Windows_NT x64 10.0.22000 Sandboxed: No - OS Version: Windows_NT x64 10.0.22000
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
author-verification-requestedIssues potentially verifiable by issue authorIssues potentially verifiable by issue authorbugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable buginsiders-releasedPatch has been released in VS Code InsidersPatch has been released in VS Code InsidersmarkdownMarkdown support issuesMarkdown support issuesverifiedVerification succeededVerification succeeded