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

An error in the Markdown2 Header creation. #1081

Closed
kellertuer opened this issue Aug 3, 2019 · 2 comments · Fixed by #1082
Closed

An error in the Markdown2 Header creation. #1081

kellertuer opened this issue Aug 3, 2019 · 2 comments · Fixed by #1082

Comments

@kellertuer
Copy link

I am not sure whether this error is due to Documenter or comes from the Markdown2 utilities, but it seems that instead of just a text it expects an array of inline nodes already. How can this error appear?

Interestingly this also happens for the master branch of my project that still created a documentation successfully maybe 4 or 5 weeks ago.

ERROR: LoadError: MethodError: no method matching Documenter.Utilities.Markdown2.Heading(::Int64, ::Documenter.Utilities.Markdown2.Text)
Closest candidates are:
  Documenter.Utilities.Markdown2.Heading(::Integer, ::Array{Documenter.Utilities.Markdown2.MarkdownInlineNode,1}) at /Users/bergmann/.julia/packages/Documenter/cMNJA/src/Utilities/Markdown2.jl:101
Stacktrace:
 [1] _convert_block(::Markdown.Header{1}) at /Users/bergmann/.julia/packages/Documenter/cMNJA/src/Utilities/Markdown2.jl:220
 [2] iterate at ./generator.jl:47 [inlined]
 [3] collect_to!(::Array{Documenter.Utilities.Markdown2.MarkdownBlockNode,1}, ::Base.Generator{Array{Any,1},typeof(Documenter.Utilities.Markdown2._convert_block)}, ::Int64, ::Int64) at ./array.jl:651
 [4] collect_to!(::Array{Documenter.Utilities.Markdown2.CodeBlock,1}, ::Base.Generator{Array{Any,1},typeof(Documenter.Utilities.Markdown2._convert_block)}, ::Int64, ::Int64) at ./array.jl:659
 [5] collect_to_with_first!(::Array{Documenter.Utilities.Markdown2.CodeBlock,1}, ::Documenter.Utilities.Markdown2.CodeBlock, ::Base.Generator{Array{Any,1},typeof(Documenter.Utilities.Markdown2._convert_block)}, ::Int64) at ./array.jl:630
 [6] _collect(::Array{Any,1}, ::Base.Generator{Array{Any,1},typeof(Documenter.Utilities.Markdown2._convert_block)}, ::Base.EltypeUnknown, ::Base.HasShape{1}) at ./array.jl:624
 [7] map at ./array.jl:548 [inlined]
 [8] convert(::Type{Documenter.Utilities.Markdown2.MD}, ::Markdown.MD) at /Users/bergmann/.julia/packages/Documenter/cMNJA/src/Utilities/Markdown2.jl:214
 [9] doctest(::Base.Docs.DocStr, ::Module, ::Documenter.Documents.Document) at /Users/bergmann/.julia/packages/Documenter/cMNJA/src/DocTests.jl:76
 [10] doctest(::Documenter.Documents.DocumentBlueprint, ::Documenter.Documents.Document) at /Users/bergmann/.julia/packages/Documenter/cMNJA/src/DocTests.jl:56
 [11] runner(::Type{Documenter.Builder.Doctest}, ::Documenter.Documents.Document) at /Users/bergmann/.julia/packages/Documenter/cMNJA/src/Builder.jl:201
 [12] dispatch(::Type{Documenter.Builder.DocumentPipeline}, ::Documenter.Documents.Document) at /Users/bergmann/.julia/packages/Documenter/cMNJA/src/Utilities/Selectors.jl:167
 [13] (::getfield(Documenter, Symbol("##3#8")))() at /Users/bergmann/.julia/packages/Documenter/cMNJA/src/Documenter.jl:319
 [14] cd(::getfield(Documenter, Symbol("##3#8")), ::String) at ./file.jl:96
 [15] #makedocs#1(::Bool, ::Documenter.Writers.HTMLWriter.HTML, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Base.Iterators.Pairs{Symbol,Any,Tuple{Symbol,Symbol,Symbol},NamedTuple{(:modules, :sitename, :pages),Tuple{Array{Module,1},String,Array{Pair{String,Any},1}}}}, ::typeof(makedocs)) at /Users/bergmann/.julia/packages/Documenter/cMNJA/src/Documenter.jl:318
 [16] (::getfield(Documenter, Symbol("#kw##makedocs")))(::NamedTuple{(:modules, :sitename, :pages),Tuple{Array{Module,1},String,Array{Pair{String,Any},1}}}, ::typeof(makedocs)) at ./none:0
 [17] top-level scope at none:0
 [18] include at ./boot.jl:326 [inlined]
 [19] include_relative(::Module, ::String) at ./loading.jl:1038
 [20] include(::Module, ::String) at ./sysimg.jl:29
 [21] include(::String) at ./client.jl:403
 [22] top-level scope at none:0
in expression starting at /Users/kellertuer/Repositories/Software/Manopt.jl/docs/make.jl:26
```
@mortenpi
Copy link
Member

mortenpi commented Aug 3, 2019

This is the culprit: https://github.com/kellertuer/Manopt.jl/blob/b8c7bf8c69fbcd930619fcc0f572ea15475d8fb1/src/functions/differentials.jl#L71-L72

You probably want to fix that docstring and that should let your docs build with the new Documenter version. But it is also a bug in the Markdown2 conversion routines.

@kellertuer
Copy link
Author

Nice, I would've never found that one. Yes, an empty heading is a bug – just the error message did not help to find it ;)

And yes, this is a duplicate of #1082.

mortenpi added a commit that referenced this issue Aug 4, 2019
* Fix MD2 parsing for empty headings

Fix #1081.

* Set version to 0.23.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants