fonol / cl-community-spec

A Common Lisp specification, made from the original ANSI specification drafts
https://cl-community-spec.github.io
MIT License
80 stars 6 forks source link

Remove `b` tags from examples #26

Closed olnw closed 1 year ago

olnw commented 1 year ago

Some pages like assert have <b> tags in the examples. This commit doesn't remove them from the HTML, but uses JS to hide them.

fonol commented 1 year ago

Thats clever. I see there are also still some <code class"no-highlight"> in there... I thought my last commit catched all of them. Now that I look at the section in scripts.js, I wonder: Isn't there a mistake anyway, because <i\/?> should be <\/?i> actually? :-P Maybe if the regex is fixed, the script can also be used to remove those <code class"no-highlight">...

olnw commented 1 year ago

I wonder: Isn't there a mistake anyway, because <i\/?> should be <\/?i> actually?

I was thinking that, but wasn't sure since I don't know JavaScript regex syntax.

olnw commented 1 year ago

This seems better, but the result is still quite different from how it looks in CLHS. (comparing cerror.html to http://www.lispworks.com/documentation/HyperSpec/Body/f_cerror.htm)

olnw commented 1 year ago

I think it's weird how ligatures are enabled, so (as an example) |> will display as a triangle in cerror.html. This can be disabled by adding font-variant-ligatures: none; to :root in styles.css.

fonol commented 1 year ago

Ligatures are enabled because when I picked the font (Cascadia Code), I accidentally picked the ligature variant. I thought it was okay and left it, but I have no strong opinions on the matter. I wonder where those |>> come from (I guess that's what you mean with the dfiference to the CLHS)?. The novaspec displays it as underlines: https://novaspec.org/cl/f_cerror

olnw commented 1 year ago

I have no strong opinions on the matter.

On this page, the ligatures are messing up some function names. I think it's probably best to disable them.

I guess that's what you mean with the dfiference to the CLHS

Yeah, that's what I was referring to. I think we should look at the Texinfo source directly to see if that's there. If it is, then maybe it's OK to leave.

fonol commented 1 year ago

Okay then, I'll add the style to disable the ligatures then and merge this!

olnw commented 1 year ago

Thank you.

olnw commented 1 year ago

Looks like we have our answer: https://cl-community-spec.github.io/pages/Special-Symbols.html

fonol commented 1 year ago

Ah, sometimes it makes sense to actually read the spec!