iamacup / react-native-markdown-display

React Native 100% compatible CommonMark renderer
MIT License
590 stars 169 forks source link

extent tokensToAST to cleanup/grouptTextTokens too #113

Closed pke closed 10 months ago

pke commented 4 years ago

Currently the AST that is returned from the currently exported functions is not entirely correct, especially with images in the markdown.

tokensToAST(stringToTokens(markdown))

returns a different (and wrong) AST than:

tokensToAST(groupTextTokens(cleanupTokens(stringToToken(markdown))))

Howver groupTextTokens and cleanupTokens are not officially exported. I wonder if we could just move this kind of processing into tokensToAST or is there a time those cleanups would not be performed?

pke commented 3 years ago

Just stumbled over a code comment referencing this issue. Have you considered the proposal @iamacup?

pke commented 10 months ago

hey @iamacup I see a lot of old issues marked as completed but fail to see the commits? What's going on?