Closed 2manyvcos closed 1 year ago
Here is a reproduction example:
https://codesandbox.io/p/sandbox/flamboyant-mestorf-n33ptd?file=%2Fsrc%2Fapp.tsx%3A17%2C4
This is intentional. Markdown supports character references in lots of places. It never supports C-style escapes. Therefore, it is logical to support character references and not C-style escapes here, too.
ASCII codes
That’s not what those are. Those are character references, as defined by the CM and HTML specs.
Thank you for the clarification.
Even though I am a bit confused, because there is a section mentioning backslash escapes in the CommonMark spec and it is possible to escape the whole directive by adding a backslash before the colon, like described in https://github.com/remarkjs/remark-directive/issues/5#issuecomment-869131256.
Also, the following is valid Markdown:
[url with \] escape](test)
[url with ] escape](test)
It even is supported in the content of directives:
:test[content with \] escape]{a=test}
Oh that, sorry, I missed what this was about. I modelled the attributes after how attributes work in HTML. So also unquoted ones work. And more character references work than solely in markdown. This means you can copy/paste things.
Oh, I see now! Thank you, that clarified it.
Initial checklist
Affected packages and versions
remark-directive
Link to runnable example
No response
Steps to reproduce
It is not possible to escape quotes in attribute, e.g. the following two examples do not work:
The only way to do this currently is to use ASCII codes:
Expected behavior
Escape sequences should work for quotes.
Actual behavior
The directive is not parsed.
Runtime
No response
Package manager
No response
OS
No response
Build and bundle tools
No response