rundel / parsermd

https://rundel.github.io/parsermd/
Other
76 stars 4 forks source link

Does parsermd scope include modifying documents? #21

Open maelle opened 3 years ago

maelle commented 3 years ago

:wave: @rundel, I am reading parsermd docs to compare its scope with tinkr before possibly pre-submitting tinkr to rOpenSci Software Peer-Review.

Does the scope of parsermd include modifying the documents? I see it's at least planned in #5?

maelle commented 3 years ago

The intro https://rundel.github.io/parsermd/articles/parsermd.html#working-with-the-ast mentions editing properties, and https://rundel.github.io/parsermd/articles/parsermd.html#ast-as-a-tibble-1 has an example where some things are removed, so that was probably a stupid question. :sweat_smile:

rundel commented 3 years ago

Not a stupid question at all - currently the package mostly supports editing of documents via the filtering of nodes within the ast - so dropping bare markdown, chunks, headers, etc.

Given the class structure is fairly straight forward it is also possible to go in and directly manipulate the ast / node objects to "edit" a document but this is all pretty manual at the moment. It is something I would like to support at some point but it hasn't been a priority for my use case as of yet.