Skip to content

Can pandoc normalise HTML links when converting Markdown to ePub3? #10958

Answered by rnwst
mattgemmell asked this question in Q&A
Discussion options

You must be logged in to vote

Hi Matt,
Thanks for explaining the problem you are facing so clearly. You can see how your example Markdown document is parsed into pandoc's AST by converting to the native format:

$ pandoc test.md -t native
[ Header
    1
    ( "first-section" , [] , [] )
    [ Str "First" , Space , Str "section" ]
, Para
    [ Link
        ( "" , [] , [] )
        [ Str "This"
        , Space
        , Str "link"
        , Space
        , Str "will"
        , Space
        , Str "work"
        , Space
        , Str "in"
        , Space
        , Str "ePubs"
        ]
        ( "#second-section" , "" )
    ]
, Para
    [ RawInline (Format "html") "<a href=\"#second-section\">"
    , Str "This"
    , Spac…

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@rnwst
Comment options

@mattgemmell
Comment options

@mattgemmell
Comment options

@rnwst
Comment options

@bpj
Comment options

Answer selected by mattgemmell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants