asciidoctor / atom-asciidoc-preview

⚛ AsciiDoc preview for the Atom editor.
https://atom.io/packages/asciidoc-preview
MIT License
142 stars 42 forks source link

Internal cross references not work with Chinese #246

Open ioalloc opened 7 years ago

ioalloc commented 7 years ago

Internal cross references not work with Chinese

But work fine with English

Screenshots

image

Syntax example

[WARNING]
====
执行命令需要切换到客户端根目录 <<如何进入客户端根目录>> <<SAAS>>
====
mojavelinux commented 7 years ago

This problem will be resolved once Asciidoctor.js 1.5.6 is available and this plugin is upgraded to use it. Prior to that version, Asciidoctor.js only supported Latin characters (due to a limitation in the JavaScript regexp engine) where character ranges are enforced (which is not that many places, but xrefs are one of them). Asciidoctor.js gains support for matching character ranges across all languages. For example, to match a word character, it considers word characters in Chinese in addition to English.

mojavelinux commented 7 years ago

See https://github.com/asciidoctor/asciidoctor.js/pull/291.

ioalloc commented 7 years ago

thanks guys