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

Markdown headers (both styles) are ignored #905

Closed
crystalfp opened this issue Jul 12, 2013 · 8 comments
Closed

Markdown headers (both styles) are ignored #905

crystalfp opened this issue Jul 12, 2013 · 8 comments

Comments

@crystalfp
Copy link

Take the following fragment:

Summerhill: la scuola più felice del mondo!
-------------------------------------------
Dal libro: "I ragazzi felici di Summerhill" di Alexander Neil ed. Red
<http://www.disinformazione.it/summerhill.htm>

I bambini cresciuti nella libertà hanno molto meno odio da sfogare di quelli repressi.

Copy in a text file and set it to utf-8 charset. Now using pandoc 1.11.1 (on windows 7 64 bits) convert it to html or docx or latex. Same result. The first line (and the subsequent line of dashes) is not converted to an header. The same happens if I remove the dashes and change the first line to:

## Summerhill: la scuola più felice del mondo! ##

What I'm doing wrong?
Thanks for your help!
mario

@ousia
Copy link
Contributor

ousia commented Jul 12, 2013

Mario,

as far as I know. titles are marked at the beginning, not at the end:

## Summerhill: la scuola più felice del mondo!

I hope it helps,

Pablo

@crystalfp
Copy link
Author

Thanks, but no way. Same as before (i.e. no header line).

I tried to remove the accented character, but does not change anything.

Thanks for your help!
mario

P.S.: The markdown format specification says are valid both forms ## xxxxxx ## and ## xxxxxx

@ousia
Copy link
Contributor

ousia commented Jul 12, 2013

It seems your first sample should work.

@crystalfp
Copy link
Author

Strange, the on-line version (http://johnmacfarlane.net/pandoc/try) works without errors.

But I found a workaround:
pandoc -r markdown_strict -w html myfile.md

Don't understand why, but now I'm able to work.

Thanks!
mario

@jgm
Copy link
Owner

jgm commented Jul 13, 2013

I can't reproduce this, with either the development version of pandoc or the last official release.

I haven't yet tried it on a Windows machine, though.

@jgm
Copy link
Owner

jgm commented Jul 14, 2013

Tried it on a Windows machine, and couldn't reproduce there either. I also can't think of any reason why using markdown_strict would make a difference. I'll close this now, but if you have more information that might allow me to reproduce the problem, feel free to comment and reopen.

@jgm jgm closed this as completed Jul 14, 2013
@crystalfp
Copy link
Author

Thanks Pablo!
Seems the crucial thing is that before the first header there are no
blank lines.
Try to add one blank line at the beginning and the example fails even
online.

Also if I do pandoc -f markdown_strict -t markdown my-example.md -o
pandoc-example.md the only thing changed is the empty line at the beginning.

Thanks again!
mario

On 12-Jul-13 22:43, Pablo Rodríguez wrote:

It seems your first sample should work
http://johnmacfarlane.net/pandoc/try/?text=Summerhill%3A+la+scuola+pi%C3%B9+felice+del+mondo!%0A-------------------------------------------%0ADal+libro%3A+%22I+ragazzi+felici+di+Summerhill%22+di+Alexander+Neil+ed.+Red%0A%3Chttp%3A%2F%2Fwww.disinformazione.it%2Fsummerhill.htm%3E%0A%0AI+bambini+cresciuti+nella+libert%C3%A0+hanno+molto+meno+odio+da+sfogare+di+quelli+repressi.%0A&from=markdown&to=html.


Reply to this email directly or view it on GitHub
#905 (comment).

Ing. Mario Valle
Swiss National Supercomputing Centre (CSCS) | http://mariovalle.name/
v. Trevano 131, 6900 Lugano, Switzerland | Tel: +41 (91) 610.82.60

@jgm
Copy link
Owner

jgm commented Jul 14, 2013

Aha - it's good to know that the file started with blank lines. I believe that issue has been fixed in the development version - see #882.

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

No branches or pull requests

3 participants