yusanshi / emgithub

Embed a file from GitHub repository just like GitHub Gist.
https://emgithub.com
MIT License
405 stars 77 forks source link

how do i get rid of the 2 empty lines below the last code line when embedding? #2

Closed horstjens closed 4 years ago

horstjens commented 4 years ago

i embed python code into a html website using https://emgithub.com/pytorch/pytorch/blob/master/torch/nn/cpp.py

I noticed that below the last code line but above the lower border Screenshot at 2020-04-20 07-44-49 of the code container seem to be 2 empty lines, how can i disable them?

yusanshi commented 4 years ago

I think this's because the environment where the code is shown is adding other CSS styles for the pre tag. To solve this, I decide to use a simulated pre tag to avoid style being added or overwritten. (See 18ba04cb8ffe7500893e0d25d63f59e8e4b052f1)

In this way, what you see on the page where code is embedded should look basically the same as it is on emgithub.com.