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

转义导致Tex公式解析失败 #123

Closed
kin9-0rz opened this issue Mar 2, 2018 · 1 comment
Closed

转义导致Tex公式解析失败 #123

kin9-0rz opened this issue Mar 2, 2018 · 1 comment

Comments

@kin9-0rz
Copy link
Contributor

kin9-0rz commented Mar 2, 2018

Markdown provides backslash escapes for the following characters:

\   backslash
`   backtick
*   asterisk
_   underscore
{}  curly braces
[]  square brackets
()  parentheses
#   hash mark
+   plus sign
-   minus sign (hyphen)
.   dot
!   exclamation mark

这段代码会导致使用Tex格式的数学公式解析失败:

// amWiki\js\amWiki.docs.js
        //增加"\"符转义功能
        content = content.replace(/\\(.)/g, function (m, s1) {
            return '&#' + s1.charCodeAt(0) + ';';
        });
kin9-0rz pushed a commit to kin9-0rz/amWiki that referenced this issue Mar 2, 2018
@kin9-0rz
Copy link
Contributor Author

kin9-0rz commented Mar 2, 2018

Tex数学公式中如果涉及转义,仍然需要自行转义,如:

  • \\ 需要转成\\\\
  • \nabla_i 需要转成 \nabla\_i

@kin9-0rz kin9-0rz closed this as completed Mar 2, 2018
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

1 participant