-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Set type
member for all nodes
#2000
Labels
L2 - annoying
Similar to L1 - broken but there is a known workaround available for the issue
Comments
UziTech
added
the
L2 - annoying
Similar to L1 - broken but there is a known workaround available for the issue
label
Apr 8, 2021
If you would like to create a PR to add the type that would be much appreciated. You should just need to add a Lines 344 to 356 in d0f9ffd
|
Ok I will do one. What about the case where the Edit: It seems the case where space doesn't define Line 132 in d0f9ffd
|
5 tasks
5 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What pain point are you perceiving?.
Not all nodes have a
type
member set, namely thedef
(seemarked/lib/marked.js
Line 747 in d0f9ffd
and also in one case for the
space
node:marked/lib/marked.js
Line 485 in d0f9ffd
Having a defined
type
member would help discriminating them when iterating the markdown tree.It also seems to be an issue for the https://www.npmjs.com/package/@types/marked packages, where the
Def
interface does't have atype
member, and thus it is not possible to discriminate node types in typescript (I guess it could be possible to add a type member in the interface, but it would be troublesome if this project later chose a different string).Describe the solution you'd like
Add a
type
member to all nodes of the markdown tree.The text was updated successfully, but these errors were encountered: