Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add fallback Markdown -> Markdown2 convert methods #1075

Merged
merged 7 commits into from
Jul 29, 2019
Merged

Conversation

mortenpi
Copy link
Member

@mortenpi mortenpi commented Jul 26, 2019

It's easy to end up with Symbols, Ints or other arbitrary Julia objects in Markdown.MD trees. While it usually indicates a problematic docstring or a parser bug, this makes sure that we do not just crash in those situations. Rather, we just convert them to text nodes with repr().

Fix #1073.

It's easy to end up with Symbols, Ints or other arbitrary Julia objects
in Markdown.MD trees. While it usually indicates a problematic docstring
or a parser bug, this makes sure that we do not just crash in those
situations. Rather, we just convert them to text nodes with repr().
src/Utilities/Markdown2.jl Outdated Show resolved Hide resolved
src/Utilities/Markdown2.jl Outdated Show resolved Hide resolved
mortenpi and others added 2 commits July 26, 2019 17:54
@mortenpi
Copy link
Member Author

Thanks @fredrikekre!

mortenpi added 4 commits July 27, 2019 01:11
Using the `@doc @doc(foo) bar` pattern wraps the docstrings in another
layer of Markdown.MD, which needs to be unwrapped before converting to
Markdown2.
As the Markdown parser technically allows you to have arbitrary Julia
expressions in the Markdown tree, this makes sure that we do not crash
with a missing method error in that situation.
@mortenpi mortenpi merged commit 56f1f82 into master Jul 29, 2019
@mortenpi mortenpi deleted the mp/fix-mdparse branch July 29, 2019 01:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Regression causing Documenter to crash when compiling ApproxFun manual
2 participants