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

Multi-paragraph inline notes in markdown input are gobbled #8028

Closed
Witiko opened this issue Apr 20, 2022 · 2 comments
Closed

Multi-paragraph inline notes in markdown input are gobbled #8028

Witiko opened this issue Apr 20, 2022 · 2 comments
Labels

Comments

@Witiko
Copy link

Witiko commented Apr 20, 2022

Explain the problem.
The markdown+inline_notes reader will recognize multi-paragraph inline notes, but it will gobble all paragraphs except the first:

$ pandoc -f markdown+inline_notes -t native <<< $'foo^[This is a footnote\n\nthat spans several paragraphs] bar'
[ Para
    [ Str "foo"
    , Note
        [ Para
            [ Str "This"
            , Space
            , Str "is"
            , Space
            , Str "a"
            , Space
            , Str "footnote"
            ]
        ]
    , Space
    , Str "bar"
    ]
]

Since inline footnotes are inline elements, I would expect that multi-paragraph notes not be recognized as notes:

[ Para
    [ Str "foo^[This"
    , Space
    , Str "is"
    , Space
    , Str "a"
    , Space
    , Str "footnote"
    ]
, Para
    [ Str "that"
    , Space
    , Str "spans"
    , Space
    , Str "several"
    , Space
    , Str "paragraphs]"
    , Space
    , Str "bar"
    ]
]

Pandoc version?
Manually built using the witiko/pandoc-devenv Docker image from Pandoc source code at commit ec27946:

$ pandoc -v
pandoc 2.18
Compiled with pandoc-types 1.22.2, texmath 0.12.5, skylighting 0.12.3,
citeproc 0.7, ipynb 0.2, hslua 2.2.0
Scripting engine: Lua 5.4
User data directory: /root/.local/share/pandoc
Copyright (C) 2006-2022 John MacFarlane. Web:  https://pandoc.org
This is free software; see the source for copying conditions. There is no
warranty, not even for merchantability or fitness for a particular purpose.
@Witiko Witiko added the bug label Apr 20, 2022
@jgm
Copy link
Owner

jgm commented Apr 20, 2022

From the manual:
"Inline footnotes are also allowed (though, unlike regular notes,
they cannot contain multiple paragraphs). "

@jgm
Copy link
Owner

jgm commented Apr 20, 2022

I agree with your judgment here.

@jgm jgm closed this as completed in f3cfeba Apr 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants