jgm / djot.js

JavaScript implementation of djot
MIT License
141 stars 15 forks source link

attributes: allow non-ascii id #72

Closed black-desk closed 6 months ago

black-desk commented 6 months ago

Current djot.js allows non-ascii heading:

# 中文

After renderDjot it becomes:

{#中文}
# 中文

As djot.js use \w to scan id, it fails to parse {#中文} as block attributes.

I copy the regexp from getUniqueIdentifier to fix this issue.

Signed-off-by: black-desk me@black-desk.cn