Skip to content

Commit aa37e17

Browse files
Do not preprocess Unicode newlines in Markdown preview (microsoft#166026)
Revert LS PS preprocessing in Markdown preview
1 parent d2441c5 commit aa37e17

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

extensions/markdown-language-features/src/markdownEngine.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ import { ITextDocument } from './types/textDocument';
1313
import { WebviewResourceProvider } from './util/resources';
1414
import { isOfScheme, Schemes } from './util/schemes';
1515

16-
const UNICODE_NEWLINE_REGEX = /\u2028|\u2029/g;
17-
1816
/**
1917
* Adds begin line index to the output via the 'data-line' data attribute.
2018
*/
@@ -189,7 +187,7 @@ export class MarkdownItEngine implements IMdParser {
189187
private _tokenizeString(text: string, engine: MarkdownIt) {
190188
this._resetSlugCount();
191189

192-
return engine.parse(text.replace(UNICODE_NEWLINE_REGEX, ''), {});
190+
return engine.parse(text, {});
193191
}
194192

195193
private _resetSlugCount(): void {

0 commit comments

Comments
 (0)