MichaelHatherly / CommonMark.jl

A CommonMark-compliant Markdown parser for Julia.
Other
84 stars 11 forks source link

Add test for interpolating markdown strings #17

Closed jeremiahpslewis closed 3 years ago

jeremiahpslewis commented 3 years ago

@MichaelHatherly Looks like you were far faster than I at building out this new feature. I've been using this branch in a personal project and couldn't find a glitch so far. :) Reviewed the tests you have written, doesn't look like there are any obvious edge cases neglected as long as we keep away from the 'dollar math debacle', with the exception of the question: if an interpolated variable returns a string, do we then parse it for potential markdown syntax? Personally don't have a strong opinion, but I've encoded the status quo in a test within this PR.

MichaelHatherly commented 3 years ago

I think the most sensible approach would be to not do any kind of nested parsing to markdown for interpolated strings. If the user wants to interpolate markdown into their markdown they can pass the inner markdown themselves.

MichaelHatherly commented 3 years ago

If you can rebase onto current mh/interp then I'll get this merged in there, merge it into master and just get a tagged release done. Thanks for the tests.

jeremiahpslewis commented 3 years ago

@MichaelHatherly Looks good now?

MichaelHatherly commented 3 years ago

thanks @jlewis91