Skip to content

[Parsing] Using Fold and Character lists #40

@dishmint

Description

@dishmint

I've read a few times that using RegEx for markdown parsing is not ideal, iirc, because the regex can't capture certain markdown scenarios.

A character reader could be implemented with Fold:

string = "_this_ is **markdown**";

Fold[ lex, "<start_markdown>", Characters@string ]

could add DataStructure into this

string = "_this_ is **markdown**";

ds = CreateDataStructure["Stack"];

Fold[ lex[ds], "<start_markdown>", Characters@string ]

Then the lex function would update the stack.

Metadata

Metadata

Assignees

Labels

requestNew feature or request

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions