gajus/gitdown

Encoding issues

Closed this issue · 6 comments

Gitdown.read('.gitdown/README.md').write('README.md')

Gitdown uses invalid encoding and as result npm displays it incorrectly.

https://www.npmjs.com/package/gitdown
https://www.npmjs.com/package/gulp-webpack-build
etc.

Please provide more debug information. If it is an easy fix, I will sort it out ASAP.

@gajus what kind of debug information I should provide?

github parses README.md correctly, but npm can't parse it and escapes " with '.

Unfortunately, it appears after gitdown processing.

md-file will display correctly on npm if you use md-file without any gitdown processing.

@gajus Have you got any idea why npm displays gitdown-files incorrectly?

This is not encoding issue with gitdown. It is the markdown processor that npmjs.com is using, https://github.com/npm/newww/issues/622. I have raised an issue. In the mean time, going to leave this open as a bug, in case npmjs refuse to fix it and a workaround is needed. Some alternatives are described here, http://stackoverflow.com/questions/4823468/store-comments-in-markdown-syntax.

Fixed by removing HTML comments from the output.

@gajus Thanks!