Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/microsoft/vscode.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarina Miyaoka <37388187+miyaokamarina@users.noreply.github.com>2022-11-10 22:46:43 +0300
committerGitHub <noreply@github.com>2022-11-10 22:46:43 +0300
commitaa37e17423137d2b27008bb83f8bccdf8a2a2728 (patch)
treeaf1eea269e71cb2b6a1e8582ffe7b021846a8f5a
parentd2441c5e3a0e6848cadf9052dcca887a36d3ca62 (diff)
Do not preprocess Unicode newlines in Markdown preview (#166026)
Revert LS PS preprocessing in Markdown preview
-rw-r--r--extensions/markdown-language-features/src/markdownEngine.ts4
1 files changed, 1 insertions, 3 deletions
diff --git a/extensions/markdown-language-features/src/markdownEngine.ts b/extensions/markdown-language-features/src/markdownEngine.ts
index 8712dfc9985..5b17f49fc4c 100644
--- a/extensions/markdown-language-features/src/markdownEngine.ts
+++ b/extensions/markdown-language-features/src/markdownEngine.ts
@@ -13,8 +13,6 @@ import { ITextDocument } from './types/textDocument';
import { WebviewResourceProvider } from './util/resources';
import { isOfScheme, Schemes } from './util/schemes';
-const UNICODE_NEWLINE_REGEX = /\u2028|\u2029/g;
-
/**
* Adds begin line index to the output via the 'data-line' data attribute.
*/
@@ -189,7 +187,7 @@ export class MarkdownItEngine implements IMdParser {
private _tokenizeString(text: string, engine: MarkdownIt) {
this._resetSlugCount();
- return engine.parse(text.replace(UNICODE_NEWLINE_REGEX, ''), {});
+ return engine.parse(text, {});
}
private _resetSlugCount(): void {