We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Marked version:
4.0.1
Describe the bug
Marked crashes when parsing file with error TypeError: Cannot read properties of undefined (reading 'trim')
TypeError: Cannot read properties of undefined (reading 'trim')
To Reproduce
write the following file to test.js
const marked = require("marked"); const source = `\\| - * ` console.log(marked.parse(source));
run node test.js
node test.js
result is
marked/lib/marked.cjs:2600 throw e; ^ TypeError: Cannot read properties of undefined (reading 'trim') Please report this to https://github.com/markedjs/marked.
Issue can also be seen in the demo https://marked.js.org/demo/?text=%5C%7C%0A-%0A*%0A%09&options=%7B%0A%20%22baseUrl%22%3A%20null%2C%0A%20%22breaks%22%3A%20false%2C%0A%20%22extensions%22%3A%20null%2C%0A%20%22gfm%22%3A%20true%2C%0A%20%22headerIds%22%3A%20true%2C%0A%20%22headerPrefix%22%3A%20%22%22%2C%0A%20%22highlight%22%3A%20null%2C%0A%20%22langPrefix%22%3A%20%22language-%22%2C%0A%20%22mangle%22%3A%20true%2C%0A%20%22pedantic%22%3A%20false%2C%0A%20%22sanitize%22%3A%20false%2C%0A%20%22sanitizer%22%3A%20null%2C%0A%20%22silent%22%3A%20false%2C%0A%20%22smartLists%22%3A%20false%2C%0A%20%22smartypants%22%3A%20false%2C%0A%20%22tokenizer%22%3A%20null%2C%0A%20%22walkTokens%22%3A%20null%2C%0A%20%22xhtml%22%3A%20false%0A%7D&version=4.0.1
Expected behavior
No error is thrown (https://spec.commonmark.org/dingus/?text=%5C%7C%0A-%0A*%0A%09)
The text was updated successfully, but these errors were encountered:
The issue appears to be specific to GFM mode (demo example without GFM) It appears to affect releases between 3.0.0-4.0.1 (demo example with 3.0.0)
Sorry, something went wrong.
I suspect this is the same issue as #2249
ya this seems like a duplicate of #2249
No branches or pull requests
Marked version:
4.0.1
Describe the bug
Marked crashes when parsing file with error
TypeError: Cannot read properties of undefined (reading 'trim')
To Reproduce
write the following file to test.js
run
node test.js
result is
Issue can also be seen in the demo
https://marked.js.org/demo/?text=%5C%7C%0A-%0A*%0A%09&options=%7B%0A%20%22baseUrl%22%3A%20null%2C%0A%20%22breaks%22%3A%20false%2C%0A%20%22extensions%22%3A%20null%2C%0A%20%22gfm%22%3A%20true%2C%0A%20%22headerIds%22%3A%20true%2C%0A%20%22headerPrefix%22%3A%20%22%22%2C%0A%20%22highlight%22%3A%20null%2C%0A%20%22langPrefix%22%3A%20%22language-%22%2C%0A%20%22mangle%22%3A%20true%2C%0A%20%22pedantic%22%3A%20false%2C%0A%20%22sanitize%22%3A%20false%2C%0A%20%22sanitizer%22%3A%20null%2C%0A%20%22silent%22%3A%20false%2C%0A%20%22smartLists%22%3A%20false%2C%0A%20%22smartypants%22%3A%20false%2C%0A%20%22tokenizer%22%3A%20null%2C%0A%20%22walkTokens%22%3A%20null%2C%0A%20%22xhtml%22%3A%20false%0A%7D&version=4.0.1
Expected behavior
No error is thrown (https://spec.commonmark.org/dingus/?text=%5C%7C%0A-%0A*%0A%09)
The text was updated successfully, but these errors were encountered: