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

Using dlists can result in "node.getContext() is not a function" error #5

Closed

Conversation

cpfeiffer
Copy link
Contributor

This PR fixes the problem described in #4. Instead of aborting, it logs a warning and keeps on validating.

@cpfeiffer cpfeiffer force-pushed the fix-node-getcontext-not-a-function branch from 35d49c5 to f949dca Compare July 29, 2024 09:44
Avoid crashing with "node.getContext() is not a function"

Quote from https://asciidoctor.github.io/asciidoctor.js/main/#listitem

"In a description list (dlist), each item is a tuple that
 consists of a 2-item Array of ListItem terms and a ListItem
 description (i.e., [[term, term, ...], desc]. If a description
 is not set, then the second entry in the tuple is nil."
@cpfeiffer cpfeiffer force-pushed the fix-node-getcontext-not-a-function branch from f949dca to afbbe0c Compare July 29, 2024 15:45
@philwebb philwebb changed the title Fixes #4 node.getContext() is not a function Using dlists can result in "node.getContext() is not a function" error Nov 5, 2024
philwebb pushed a commit that referenced this pull request Nov 5, 2024
Protect against array nodes such as `dlist`.

Quote from https://asciidoctor.github.io/asciidoctor.js/main/#listitem

"In a description list (dlist), each item is a tuple that
consists of a 2-item Array of ListItem terms and a ListItem
description (i.e., [[term, term, ...], desc]. If a description
is not set, then the second entry in the tuple is nil."

See gh-5
@philwebb philwebb closed this in 73daaf7 Nov 5, 2024
@philwebb philwebb self-assigned this Nov 5, 2024
@philwebb
Copy link
Collaborator

philwebb commented Nov 5, 2024

Thanks @cpfeiffer. Sorry it's taken so long to get to this.

@philwebb philwebb added this to the v1.0.0-alpha.4 milestone Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants