Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

runtime error when transform yfm-cut with curly brackets in title #375

Open
d3m1d0v opened this issue Feb 28, 2024 · 0 comments
Open

runtime error when transform yfm-cut with curly brackets in title #375

d3m1d0v opened this issue Feb 28, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@d3m1d0v
Copy link
Member

d3m1d0v commented Feb 28, 2024

Markup:

{% 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

@d3m1d0v d3m1d0v added the bug Something isn't working label Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant