janet-lang / janet-lang.org

Website for janet
https://janet-lang.org
MIT License
90 stars 59 forks source link

Identifiers with slashes / solidi can end up across multiple lines #216

Closed sogaiu closed 3 months ago

sogaiu commented 6 months ago

It appears that an identifier like ev/call (i.e. one that contains a slash or solidus) can end up split across two lines depending on the size of one's browser window. So for ev/call, at the end of one line I would see ev/ and at the beginning of the next line I'd see call.

Here, this can be observed by visiting the event loop page, maximizing the window, and scrolling down, looking at the right edge of the main text. Depending on one's setup, I suppose this may or may not lead to a reproduction.

One thing that seems to help with this is making the following change to main.css:

diff --git a/static/css/main.css b/static/css/main.css
index c564f84..8c92614 100644
--- a/static/css/main.css
+++ b/static/css/main.css
@@ -255,6 +255,7 @@ code {
 .mendoza-code {
     padding: 0 5px;
     background: #EEE;
+    white-space: nowrap;
 }

 .mendoza-codeblock {

Not sure if that's an appropriate change, but will make a PR.

sogaiu commented 3 months ago

Closing as #217 has been merged.