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

org-mode styles in headers ignored #2504

Closed
fommil opened this issue Nov 8, 2015 · 6 comments · Fixed by #2505
Closed

org-mode styles in headers ignored #2504

fommil opened this issue Nov 8, 2015 · 6 comments · Fixed by #2505

Comments

@fommil
Copy link

fommil commented Nov 8, 2015

e.g.

** +thing+ other things

is rendered literally, rather than having the strike styling applied to thing. Same for bold/italics/etc.

@tarleb
Copy link
Collaborator

tarleb commented Nov 8, 2015

I tried this with both the current version and v1.13.2.1, but wasn't able to reproduce this.

$ echo "** +thing+ other things" | pandoc -f org -t native
[Header 2 ("",[],[]) [Strikeout [Str "thing"],Space,Str "other",Space,Str "things"]]

Which Pandoc version are you using and what's the output format?

@fommil
Copy link
Author

fommil commented Nov 8, 2015

it's in a reveal.js slide if that helps. I'm using cabal install pandoc v1.15.1.1. I'll add you to the repo so you can check 😄

@fommil
Copy link
Author

fommil commented Nov 8, 2015

@tarleb I shared my slides with you, try doing this on the section titled Product (e.g. change to +Product+ HList)

@tarleb
Copy link
Collaborator

tarleb commented Nov 8, 2015

Thanks for the sources, I can reproduce it now and am implementing a fix. A minimal version for this bug would be

echo "foo\n\n** +test+ testing\n" | pandoc -f org -t native
[Para [Str "foo"]
,Header 2 ("",[],[]) [Str "+test+",Space,Str "testing"]]

A (very hacky) temporary fix might be to use plain text as the first text in the header. E.g.
** <200b> +Product+ Hlist, where `<200b> is the zero-width whitespace (C-x 8 RET 200b). The extra space should be hardly noticeable in reveal.js.

@fommil
Copy link
Author

fommil commented Nov 8, 2015

Great, I'll try that! Any idea if you'll get round to the HTML attr parsing? That'd be awesome for setting background images.

tarleb added a commit to tarleb/pandoc that referenced this issue Nov 8, 2015
Markup as the very first item in a header wasn't recognized.  This was
caused by an incorrect parser state: positions at which inline markup
can start need to be marked explicitly by changing the parser state.
This wasn't done for headers.  The proper function to update the state
is now called at the beginning of the header parser, fixing this issue.

This fixes jgm#2504.
@tarleb
Copy link
Collaborator

tarleb commented Nov 8, 2015

I haven't really looked into it yet, sorry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants