atom-asciidoc-preview icon indicating copy to clipboard operation
atom-asciidoc-preview copied to clipboard

Internal cross references not work with Chinese

Open ioalloc opened this issue 7 years ago • 3 comments

Internal cross references not work with Chinese

But work fine with English

  • Atom version: 1.17.1 x64
  • OS: macOS 10.12.3 (16D32)
  • asciidoc-preview version: 2.10.2
  • language-asciidoc version: 1.10.0

Screenshots

image

Syntax example

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

ioalloc avatar Jun 14 '17 12:06 ioalloc

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 avatar Jun 14 '17 18:06 mojavelinux

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

mojavelinux avatar Jun 14 '17 18:06 mojavelinux

thanks guys

ioalloc avatar Jun 15 '17 13:06 ioalloc