Closed ViktorQvarfordt closed 3 years ago
Why shouldn’t it? If you don’t want colons turning into a directive, add an escape before: n\:th
.
the current behavior allows footnotes and the like: some text:fn[1]
.
Also: why write it like n:th
? Why not nth
, n’th
, or n-th
? https://en.wiktionary.org/wiki/nth
Good point. Thanks for elaborating. The current behavior makes sense.
Subject of the issue
Parsing of inline directive collides with usage of colon in natural language. (E.g.
n:th
)Your environment
codesandbox
Steps to reproduce
https://codesandbox.io/s/remark-rehype-debug-forked-oetjj?file=/src/index.js
Expected behavior
Expecting directive to not be parsed if the colon (
:
) is preceded by a letter or number.Actual behavior
Input:
Output: