diplodoc-platform / diplodoc-platform/transform
runtime error when transform yfm-cut with curly brackets in title
- Dominant language
- TypeScript
- Stars
- 69
- Forks
- 59
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 6
Description
Markup:
```md
{% cut "{title}" %}
content
{% endcut %}
```
`transform()` crash with error
```
Uncaught TypeError: Cannot read properties of undefined (reading 'type')
at exports.getMatchingOpeningToken (utils.js:236:1)
at Object.transform (patterns.js:328:1)
at Array.curlyAttrs (index.js:30:1)
at Core.process (parser_core.js:54:1)
at MarkdownIt.parseInline (index.js:561:1)
at Array.plugin (cut.js:32:1)
at Core.process (parser_core.js:54:1)
at MarkdownIt.parse (index.js:524:1)
at md.js:69:1
at transform (index.js:28:1)
```
[Example in playground](https://diplodoc-platform.github.io/playground/?input=%257B%2525%2520cut%2520%2522%257Btitle%257D%2522%2520%2525%257D%250A%250Acontent%250A%250A%257B%2525%2520endcut%2520%2525%257D%250A)
Contributor guide
Assessment
This issue has not been assessed yet.