Skip to content

xwiki writer produces wrong internal links #10711

Open
@k-jell

Description

@k-jell

Explain the problem.

The xwiki writer produces internal links that have the wrong format: [[Some other place>>/abc/def/xyz]]. The correct syntax would be: [[Some other place>>abc.def.xyz]] as can be seen here.

The commands used were:
pandoc --from html --to xwiki --no-highlight
pandoc --from dokuwiki --to xwiki --no-highlight
in the online editor.

The way the conversion works right now leads to broken links in xwiki:

Image

Clicking the link will bring up the dialog to create a new file at the wrong location:

Image

Some lua filter can be used to hack around this:

function Link(el)
    local target = el.target

    if target:match("^https?://") then
        return el
    end

    target = target:gsub("^/", "")
    target = target:gsub("/", ".")

    return pandoc.Link(el.content, target)
end

But maybe it would be a good idea to fix this here:

_ -> return $ "[[" <> label <> ">>" <> src <> "]]" <> genAnchor id'

Pandoc version?
pandoc version 3.6.4 in the online try pandoc tool and pandoc 3.1.12.1 both show the described behaviour

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions