mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-20 02:08:47 +00:00
Adding support for RTL languages for readme markdown preview. (#139644)
* [markdown preview] dir "auto" added to the markdown-body class. * fix markdown preview for RTL languages
This commit is contained in:
committed by
GitHub
parent
883009bf0f
commit
2a0d371ca3
@@ -25,6 +25,7 @@ const pluginSourceMap: MarkdownIt.PluginSimple = (md): void => {
|
||||
if (token.map && token.type !== 'inline') {
|
||||
token.attrSet('data-line', String(token.map[0]));
|
||||
token.attrJoin('class', 'code-line');
|
||||
token.attrJoin('dir', 'auto');
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -178,7 +179,7 @@ export class MarkdownEngine {
|
||||
|
||||
return engine.parse(text.replace(UNICODE_NEWLINE_REGEX, ''), {});
|
||||
}
|
||||
|
||||
|
||||
public resetSlugCount(): void {
|
||||
this._slugCount = new Map<string, number>();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user