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

Convert dokuwiki with inline code #5916

Closed
ghost opened this issue Nov 18, 2019 · 3 comments · Fixed by #5917
Closed

Convert dokuwiki with inline code #5916

ghost opened this issue Nov 18, 2019 · 3 comments · Fixed by #5917

Comments

@ghost
Copy link

ghost commented Nov 18, 2019

Hello,

I use pandoc version 2.7.3.

There is a weird behaviour when dealing with inline code in dokuwiki format, when we use '%%' to prevent further interpretion.

For example :

  • you have this text in markdown format (1) : here is some inline code
  • you convert (1) to dokuwiki format (2) : here is some ''%%inline code%%'' (it's ok, the "%%" part is not displayed when interpreting dokuwiki)
  • you convert (2) back to markdown format : here is some %%inline code%%
    In the end you have some extra "%%".

The same problem occurs with this example :

  • you have this text in dokuwiki format : here is some ''%%inline code%%''
  • you convert to HTML : %%inline code%%
    You have extra "%%" that are displayed in the HTML page.

See there for another example : https://groups.google.com/forum/#!topic/pandoc-discuss/rClN82ofG9o

@link2xt
Copy link
Collaborator

link2xt commented Nov 18, 2019

The bug is in the monospace reader, '' markup is treated as code, not just monospace. I have checked with https://www.opensourcecms.com/dokuwiki/, the behaviour is incorrect, preparing a fix.

@link2xt
Copy link
Collaborator

link2xt commented Nov 18, 2019

The problem is, DokuWiki allows markup like

''foo **bar** baz''

It is bold inside monospace. The problem is even documented in the DokuWiki writer code.

I'll need to write a function that converts Inlines to Code then.

link2xt pushed a commit to link2xt/pandoc that referenced this issue Nov 18, 2019
link2xt pushed a commit to link2xt/pandoc that referenced this issue Nov 18, 2019
@jgm
Copy link
Owner

jgm commented Nov 18, 2019

In one of the readers (HTML?) we have some code that handles cases like this by splitting, so you'd get

[Code "foo ", Strong [Code "bar"], Code " baz"]

link2xt pushed a commit to link2xt/pandoc that referenced this issue Nov 18, 2019
link2xt pushed a commit to link2xt/pandoc that referenced this issue Nov 18, 2019
@jgm jgm closed this as completed in #5917 Nov 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants