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

H1 headers not recognized #7

Closed
jmalarcon opened this issue Dec 27, 2016 · 3 comments
Closed

H1 headers not recognized #7

jmalarcon opened this issue Dec 27, 2016 · 3 comments

Comments

@jmalarcon
Copy link

Hi:

I've been experimenting with this extension and I'm having trouble to generate level 1 headers using the syntax:

# Header content

It simply doesn't recognize it and generates the text as is (with the hash shown) when I convert to PDF using the extension.

Are you experiencing this problem?

Thanks for your work!

@jmalarcon
Copy link
Author

OK, I know what is happening... And it's a small bug.

If the first character in your .md file is # and the file is encoded as UTF8 with BOM, then the PDF converter is not able to correctly identify the # as a header.

If you change the encoding to just UTF8, then there's no problem and works as expected. The problem is always with files with a BOM and a first unrecognized character.

If you use a file encoding without BOM or if you just add a new line as the first content in the file, everything works as expected.

IMHO the extension should check if there's a BOM at the beginning of the file and ignore it before converting.

HTH.

@yzane
Copy link
Owner

yzane commented Jan 8, 2017

Thanks for info.

@yzane yzane closed this as completed Jan 8, 2017
@sba923
Copy link

sba923 commented Nov 28, 2017

I just faced the issue with BOMs and will open a new issue for this to get fixed.

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