You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This might be beyond the scope of this library: is it possible to read in markdown, manipulate it, and write the modified markdown to file? I mainly want to do this to manage a long README.md with a table of contents, and lexically sorted subsections.
The text was updated successfully, but these errors were encountered:
I think it's not too difficult to write an xexpr->markdown function that uses match to recursively walk an x-expression and produce something.
Here's a small example of an xexpr->markdown that emits "lite" markdown (for use in HTML metadata, and intentionally eliminating block elements).
If you wanted to make an xexpr->markdown that emits "full" markdown, and submit it as a PR, I'd consider taking it -- however I'd be nervous:
"Full" markdown likely means many corner cases.
People might expect exact round-tripping -- (check-equal? x (xexpr->markdown (parse-markdown x))) -- for all possible x, but I think that's impossible (or at least not practically worthwhile) to make true. (One simple example: Both _em_ and <em>em</em> are valid markdown and both will parse to (em () "em"). That direction is "lossy".)
This might be beyond the scope of this library: is it possible to read in markdown, manipulate it, and write the modified markdown to file? I mainly want to do this to manage a long
README.md
with a table of contents, and lexically sorted subsections.The text was updated successfully, but these errors were encountered: