1
0
Fork 0
forked from forgejo/forgejo

Add RTL rendering support to Markdown (#24816)

Support RTL content in Markdown:


![image](dedb1b0c-2f05-40dc-931a-0d9dc81f7c97)

Example document:
https://try.gitea.io/silverwind/symlink-test/src/branch/master/bidi-text.md
Same on GitHub:
https://github.com/silverwind/symlink-test/blob/master/bidi-text.md

`dir=auto` enables a browser heuristic that sets the text direction
automatically. It is the only way to get automatic text direction.

Ref: https://codeberg.org/Codeberg/Community/issues/1021

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
silverwind 2023-05-20 23:02:52 +02:00 committed by GitHub
parent 1698c15cba
commit 32d9c47ec7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 23 additions and 5 deletions

View file

@ -23,9 +23,9 @@
}
.markup .anchor {
float: left;
padding-right: 4px;
margin-left: -20px;
line-height: 1;
color: inherit;
}
@ -37,6 +37,10 @@
outline: none;
}
.markup h1 .anchor {
margin-top: -2px; /* re-align to center */
}
.markup h1 .anchor .svg,
.markup h2 .anchor .svg,
.markup h3 .anchor .svg,