Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

能否在"配置页面"->"Markdown 模板"里边添加一个“哪些字符启用转义”的配置? #255

Open
xlshiz opened this issue Mar 30, 2022 · 1 comment

Comments

@xlshiz
Copy link

xlshiz commented Mar 30, 2022

turndown的escape功能会对很多字符进行转义

var escapes = [
  [/\\/g, '\\\\'],
  [/\*/g, '\\*'],
  [/^-/g, '\\-'],
  [/^\+ /g, '\\+ '],
  [/^(=+)/g, '\\$1'],
  [/^(#{1,6}) /g, '\\$1 '],
  [/`/g, '\\`'],
  [/^~~~/g, '\\~~~'],
  [/\[/g, '\\['],
  [/\]/g, '\\]'],
  [/^>/g, '\\>'],
  [/_/g, '\\_'],
  [/^(\d+)\. /g, '$1\\. ']
]

在实际使用过程中,还是需要对一些字符关闭转义功能的,比如"_ -"等。

@mika-cn
Copy link
Owner

mika-cn commented May 7, 2022

請給出一些使用場景,不然很難決定要不要支持這樣高級的功能。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants