Inline tokens - #1627
Conversation
|
This pull request is being automatically deployed with ZEIT Now (learn more). 🔍 Inspect: https://zeit.co/markedjs/markedjs/qba5ws1f2 |
I wasn't sure about how to add the inline tokens to the tokens array. Some tokens (like lists and blockquotes) have other tokens inside of them already so they have
This PR currently does |
|
I'm not sure why travis ci isn't reporting but the tests are passing. travis ci log |
styfle
left a comment
There was a problem hiding this comment.
I didn't review all the tests thoroughly but looks good! 🥇
|
@styfle what do you think about #1627 (comment)? |
|
I have rebased and implemented option 2 from #1627 (comment) It didn't make sense to keep the |
|
I renamed the lexer functions and reordered the parameters for the lexer so they are consistent. @styfle I think this is ready to merge if you approve. |
|
Hey @UziTech, thank you for the great work. |
|
@experimentalPrivateRepos We have a few more changes to get into the next release. I would estimate it will be about a month before the next release. |
|
@UziTech Alright, thank you for the quick response! |
Hi, since the |
Inline tokens


Description
Right now the
Lexerreturns the block tokens and theParsersends the text to theInlineLexerwhich sends the information to theRenderer. There is no way to get the inline tokens before sending them to theRenderer.This PR changes the
Lexerto return all tokens with block tokens that have tokens inside of them in atokensproperty on the token and changes theParserto act on all tokens instead of the text from the block tokens.Each token that has inline or block tokens will have a
tokensproperty that is an array of tokens.The
listtoken will have anitemsproperty which will be an array of list items. Each list item will have atokensproperty with the tokens inside the item.This PR also adds a
rawproperty to the tokens so a user can get the markdown that created that token.fixes #1626
fixes #361
TODO:
Lexer, andParserlib/marked.js) up even more.Contributor
Committer
In most cases, this should be a different person than the contributor.