yusanshi / emgithub

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

Spaces indentation lost #34

Closed glepretre closed 9 months ago

glepretre commented 9 months ago

Hi, there is a mystery somewhere:

When previewing a simple HTML file https://emgithub.com/pajasevi/CSSnowflakes/blob/master/snippet.html everything looks fine,

But when I try to embed it, I lose all indentation. There is nothing but the <script>, no CSS, etc.

image

Do you reproduce?

yusanshi commented 9 months ago

image

Yes but if you enclose it inside regular <!DOCTYPE html> <html>... <body> </body></html> it should looks normal.

(Note the <!DOCTYPE html> is necessory. Refer: https://stackoverflow.com/questions/6076432/why-do-i-need-a-doctype-what-does-it-do )

glepretre commented 9 months ago

@yusanshi Thanks for finding this out! :pray: