8000 HTML->zimwiki: links in headers are gone · Issue #6605 · jgm/pandoc · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

HTML->zimwiki: links in headers are gone #6605

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

Closed
12425 opened this issue Aug 9, 2020 · 5 comments
Closed

HTML->zimwiki: links in headers are gone #6605

12425 opened this issue Aug 9, 2020 · 5 comments

Comments

@12425
Copy link
12425 commented Aug 9, 2020
<h1><a href="http://foo/">bar</a></h1>

becomes

====== bar ======

Supposed to be

====== [[http://foo/|bar]] ======
@tarleb
Copy link
Collaborator
tarleb commented Aug 27, 2020

Could you point to some documentation which shows that this is allowed? I checked the ZimWiki writer sources, and it contains this code:

blockToZimWiki opts (Header level _ inlines) = do
  contents <- inlineListToZimWiki opts $ removeFormatting inlines   -- emphasis, links etc. not allowed in headers
  let eqs = T.replicate ( 7 - level ) "="
  return $ eqs <> " " <> contents <> " " <> eqs <> "\n"

So the removal of the link appears to be intentional. However, this is from 2016, so maybe things have changed? If you have access to resources which show how to deal with links in headers, please let us know.

CC @alexivkin, who wrote the ZimWiki writer.

@alexivkin
Copy link
Contributor

Sadly, v0.72 ZimWiki still does not allow links in the header. There are no docs around what is and what is not, I had to read the python source code for Zim. Pinging @jaap-karssenberg in case he can help.

@tarleb
Copy link
Collaborator
tarleb commented Aug 28, 2020

Thanks! Closing for now, since this is not a pandoc issue.

@jaap-karssenberg
Copy link
jaap-karssenberg commented Sep 8, 2020 via email

@tarleb
Copy link
Collaborator
tarleb commented Sep 8, 2020

Thanks @jaap-karssenberg! Reopening...

@tarleb tarleb reopened this Sep 8, 2020
@tarleb tarleb closed this as completed in b6239f4 May 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants
0