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

MarkdownAST attempted to iterate a Markdown.Paragraph #21

Open
tecosaur opened this issue Sep 27, 2023 · 3 comments
Open

MarkdownAST attempted to iterate a Markdown.Paragraph #21

tecosaur opened this issue Sep 27, 2023 · 3 comments

Comments

@tecosaur
Copy link

Hi, in trying to upgrade to Documenter 1.0 I've hit this issue (with DataToolkitBase).

ERROR: LoadError: MethodError: no method matching iterate(::Markdown.Paragraph)

Closest candidates are:
  iterate(::RegexMatch, Any...)
   @ Base regex.jl:284
  iterate(::ExponentialBackOff)
   @ Base error.jl:260
  iterate(::ExponentialBackOff, ::Any)
   @ Base error.jl:260
  ...

Stacktrace:
  [1] _convert(nodefn::MarkdownAST.NodeFn{Nothing}, c::MarkdownAST.Item, child_convert_fn::typeof(MarkdownAST._convert_block), md_children::Markdown.Paragraph)
    @ MarkdownAST ~/.julia/packages/MarkdownAST/CZtZT/src/stdlib/fromstdlib.jl:33
  [2] _convert_block(nodefn::MarkdownAST.NodeFn{Nothing}, b::Markdown.List)
    @ MarkdownAST ~/.julia/packages/MarkdownAST/CZtZT/src/stdlib/fromstdlib.jl:65
  [3] _convert(nodefn::MarkdownAST.NodeFn{Nothing}, c::MarkdownAST.Item, child_convert_fn::typeof(MarkdownAST._convert_block), md_children::Vector{Any})
    @ MarkdownAST ~/.julia/packages/MarkdownAST/CZtZT/src/stdlib/fromstdlib.jl:34
  [4] _convert_block(nodefn::MarkdownAST.NodeFn{Nothing}, b::Markdown.List)
    @ MarkdownAST ~/.julia/packages/MarkdownAST/CZtZT/src/stdlib/fromstdlib.jl:65
  [5] _convert(nodefn::MarkdownAST.NodeFn{Nothing}, c::MarkdownAST.Document, child_convert_fn::typeof(MarkdownAST._convert_block), md_children::Vector{Any})
    @ MarkdownAST ~/.julia/packages/MarkdownAST/CZtZT/src/stdlib/fromstdlib.jl:34
  [6] convert (repeats 2 times)
    @ Documenter ~/.julia/packages/MarkdownAST/CZtZT/src/stdlib/fromstdlib.jl:23 [inlined]
  [7] convert
    @ Documenter ~/.julia/packages/MarkdownAST/CZtZT/src/stdlib/fromstdlib.jl:21 [inlined]
  [8] (::Documenter.var"#49#50"{MarkdownAST.Node{Nothing}, Documenter.Page, Documenter.Document, LineNumberNode, Module, MarkdownAST.CodeBlock})()
    @ Documenter ~/.julia/packages/Documenter/Meee1/src/expander_pipeline.jl:630
  [9] cd(f::Documenter.var"#49#50"{MarkdownAST.Node{Nothing}, Documenter.Page, Documenter.Document, LineNumberNode, Module, MarkdownAST.CodeBlock}, dir::String)
    @ Base.Filesystem ./file.jl:112
 [10] runner(::Type{Documenter.Expanders.EvalBlocks}, node::MarkdownAST.Node{Nothing}, page::Documenter.Page, doc::Documenter.Document)
    @ Documenter ~/.julia/packages/Documenter/Meee1/src/expander_pipeline.jl:610
 [...]
 [20] top-level scope
    @ ~/.julia/dev/DataToolkitBase/docs/make.jl:19
in expression starting at /home/tec/.julia/dev/DataToolkitBase/docs/make.jl:19
@tecosaur tecosaur changed the title MarkdowAST attempted to iterate a Markdown.Paragraph MarkdownAST attempted to iterate a Markdown.Paragraph Sep 27, 2023
@mortenpi
Copy link
Member

It looks like you have an invalid Markdown stdlib AST. Do you have an MWE? I suspect it did not come from the parser..

@tecosaur
Copy link
Author

I'm not completely sure which bit of the docs it's coming from, but the obvious candidate is this @eval block here: https://github.com/tecosaur/DataToolkitBase.jl/blob/main/docs/src/advising.org#index-of-advised-calls

@mortenpi
Copy link
Member

mortenpi commented Sep 28, 2023

I'd say your best bet would be to add some debug prints into MarkdownAST and see what AST it's converting when it crashes. From the stacktrace it looks like there's a list that is not wrapped enough times in vectors.

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

No branches or pull requests

2 participants