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

"error Cannot process file [cause]: TypeError: chunks[startIndex].slice is not a function" parsing Markdown with unclosed directive syntax #17

Closed
4 tasks done
DavidAnson opened this issue May 21, 2024 · 6 comments
Labels
👯 no/duplicate Déjà vu 👎 phase/no Post cannot or will not be acted on

Comments

@DavidAnson
Copy link

Initial checklist

Affected packages and versions

[email protected], [email protected]

Link to runnable example

No response

Steps to reproduce

See underlying micromark issue for context: micromark/micromark#173

I've opened this separate issue for the awareness of the folks who maintain remark.

user@HOST mmi % npm ls
mmi@ /Users/user/Documents/mmi
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]

user@HOST mmi % cat bug.md
* some text
   :::note

a%
user@HOST mmi % ./node_modules/.bin/remark bug.md --use remark-directive
bug.md
 error Cannot process file
  [cause]:
    TypeError: chunks[startIndex].slice is not a function
    at sliceChunks (file:///Users/user/Documents/mmi/node_modules/micromark/lib/create-tokenizer.js:512:32)
    at Object.sliceStream (file:///Users/user/Documents/mmi/node_modules/micromark/lib/create-tokenizer.js:153:12)
    at subcontent (file:///Users/user/Documents/mmi/node_modules/micromark-util-subtokenize/index.js:150:24)
    at subtokenize (file:///Users/user/Documents/mmi/node_modules/micromark-util-subtokenize/index.js:71:30)
    at postprocess (file:///Users/user/Documents/mmi/node_modules/micromark/lib/postprocess.js:12:11)
    at fromMarkdown (file:///Users/user/Documents/mmi/node_modules/mdast-util-from-markdown/lib/index.js:174:5)
    at parser (file:///Users/user/Documents/mmi/node_modules/remark-parse/lib/index.js:33:12)
    at Function.parse (file:///Users/user/Documents/mmi/node_modules/unified/lib/index.js:668:12)
    at parse (file:///Users/user/Documents/mmi/node_modules/unified-engine/lib/file-pipeline/parse.js:59:36)
    at wrapped (file:///Users/user/Documents/mmi/node_modules/trough/lib/index.js:160:27)

✖ 1 error
user@HOST mmi %

Expected behavior

Can process file

Actual behavior

Cannot process file (see above)

Runtime

Node v17

Package manager

npm 8

OS

macOS

Build and bundle tools

Other (please specify in steps to reproduce)

@github-actions github-actions bot added 👋 phase/new Post is being triaged automatically 🤞 phase/open Post is being triaged manually and removed 👋 phase/new Post is being triaged automatically labels May 21, 2024
@ChristianMurphy
Copy link
Member

Possibly a duplicate of the continuation error from micromark/micromark-extension-directive#16

@ChristianMurphy
Copy link
Member

I've opened this separate issue for the awareness of the folks who maintain remark.

For reference, pretty much the same team.

@ChristianMurphy
Copy link
Member

Closing this copy as it is an issue in a lower level dependency.

@ChristianMurphy ChristianMurphy closed this as not planned Won't fix, can't repro, duplicate, stale May 21, 2024
Copy link

Hi! Thanks for taking the time to contribute!

Because we treat issues as our backlog, we close duplicates to focus our work and not have to touch the same chunk of code for the same reason multiple times. This is also why we may mark something as duplicate that isn’t an exact duplicate but is closely related.

Thanks,
— bb

This comment has been minimized.

This comment was marked as resolved.

@github-actions github-actions bot added 👎 phase/no Post cannot or will not be acted on and removed 🤞 phase/open Post is being triaged manually labels May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
👯 no/duplicate Déjà vu 👎 phase/no Post cannot or will not be acted on
Development

No branches or pull requests

2 participants