xy2z / PineDocs

A fast and lightweight site for viewing files
GNU General Public License v3.0
141 stars 19 forks source link

Prevent line breaks in code blocks #85

Closed ghost closed 4 years ago

ghost commented 4 years ago

It would be great to have the option to prevent line breaks in code blocks. The user should be able to horizontally scroll in individual code blocks.

xy2z commented 4 years ago

Good point, actually i think this should be the default.

Feel free to submit a PR or I might look at this later this month

xy2z commented 4 years ago

This is now fixed in release v1.1.1

ghost commented 4 years ago

Thank you for your fast push! Scrolling vertically works but it seems something else is now broken: When I create a code block with multiple lines everything gets pushed into one line.

A code block that should look like that: Line 1 Line 2 Line 3

Looks like: Line 1 Line 2 Line 3

And there is another problem: When I put 2 or more empty lines into a code block it does not get recognized as a code block.

xy2z commented 4 years ago

This should work now, can you test it @nasourso ? If you use docker, use the "latest" tag

ghost commented 4 years ago

The unwanted line breaks are gone. Good job! I found out why my code block broke after I put empty lines into it.

My file looks like that: e1

This is what it looks like in PineDocs: e2

When I put a new line between the - 2 and the beginning of the code block it outputs it correctly.

I do not know if this is a markdown thing or a bug in PineDocs.

xy2z commented 4 years ago

great! the other issues sounds weird, i can see it works here in github so it should work in markdown. it's using an old version of "marked" so i'll try to update it and see maybe that will help. but thats a new issue: #86

xy2z commented 4 years ago

hey @nasourso this should work now in v1.1.3

ghost commented 4 years ago

Sadly it still does not work with my example file. It now looks like that:

e3

xy2z commented 4 years ago

oh that sucks, but you have to make an issue over at markedjs github repo: https://github.com/markedjs/marked