Adding support for RTL languages for readme markdown preview.#139644
Adding support for RTL languages for readme markdown preview.#139644mjbvz merged 2 commits intomicrosoft:mainfrom
Conversation
mjbvz
left a comment
There was a problem hiding this comment.
LGTM, just one question if we can get away with just setting it on the top level element
| if (token.map && token.type !== 'inline') { | ||
| token.attrSet('data-line', String(token.map[0])); | ||
| token.attrJoin('class', 'code-line'); | ||
| token.attrJoin('dir', 'auto'); |
There was a problem hiding this comment.
Is this required or is dir inherited by child elements?
There was a problem hiding this comment.
It is required. Because dir="auto" just looks at the first paragraph and apply direction to all the child element.
Childs just inherit rtl or ltr. Childs doesn't inherit auto and it is not so smart.
I think we can only add dir="auto" to the code-line classes (childs). But for markdown-body class is optional.
| } | ||
|
|
||
| public resetSlugCount(): void { |
There was a problem hiding this comment.
Here we have an empty extra line here.
|
Thanks! Will be in the next VS Code insiders build and scheduled to be released as part of VS Code 1.64 |
This PR fixes #139643
I'm solving this issue as a good-first-issue. If you think anything is wrong please help me to solve it. :)