I use GitHub pages to host a website. Everything works fine except syntax highlighter. It adds extra empty line if Java code line starts with //
and does not update line numbers. When I run the same site locally everything is works fine. Here is an example.
As you can see it added an empty line after //
comment.
And if run locally everything is ok.
My _config.yml
gems:
- jekyll-paginate
- jekyll-sitemap # add /sitemap.xml file
paginate_path: /_pages/page:num
highlighter: rouge
markdown: kramdown
kramdown:
input: GFM
How can I sort this problem?
This is a line ending problem. You have to change CRLF to LF.
Configure your code editor to use LF. If you can't, change editor.