PoiScript / orgize

A Rust library for parsing org-mode files.
https://poiscript.github.io/orgize/
MIT License
277 stars 34 forks source link

UnexpectedChildren when parsing a footnote definition #60

Closed vsuharnikov closed 2 months ago

vsuharnikov commented 1 year ago

Hello! I'm trying to parse a document with footnotes, but get an advice to create a new issue :) The minimal example is:

Foo bar[fn:1] baz

* Footnotes

[fn:1] http://example.com

I use only "\n" as a new line. And the error is:

Org validation failed. 1 error(s) found:
UnexpectedChildren { at: NodeId { index1: 6, stamp: NodeStamp(0) } } at FnDef(FnDef { label: "1", post_blank: 0 })
thread 'main' panicked at 'Looks like there's a bug in orgize! Please report it with your org-mode content at https://github.com/PoiScript/orgize/issues.', /home/fr/.cargo/registry/src/github.com-1ecc6299db9ec823/orgize-0.9.0/src/validate.rs:203:17

Also I tried to parse the official guide https://git.savannah.gnu.org/cgit/emacs/org-mode.git/plain/doc/org-guide.org (which looks as a good test for a parser), but had no luck.

PoiScript commented 7 months ago

Thanks you for reporting this. It seems like this bug has been fixed in v0.10.

But orgize doesn't render footnote to html properly:

image
vsuharnikov commented 2 months ago

It fixed, thanks! My issue is resolved since I'm using orgize only for parsing my documents. So I'm closing this.