-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Markup for definitions #19
Comments
In fact they are not at all in |
Also word-joiners (U+2060) should be introduced between the |
Do you have examples of |
|
I did some work on that, it's most likely not perfect yet but I think you can already have a look. |
It seems identifier (value and type) are not tagged, also you should avoid putting spaces inside the spans (e.g. in For example:
should rather be:
|
@trefis ocaml-doc/doc-ock-html@18ac839 doesn't work: it breaks cut and paste in certain cases (in this case c&p from chrome to emacs on osx). Basically we should not try to solve this at the character level. It seems that the forward is to properly |
Sadness... Thanks for the report. |
@trefis notes sometimes definitions remain quite unreadable since the break points remain unpredictable. Along with improving the |
This also works quite well to treat polymorphic types like |
I wonder if there's any way we can use the work going in on ocamlformat to help here? @Julow |
To me, it seems both not obvious and overkill. |
Unlikely, |
Ok, thanks. |
As far as I can tell, all of this has been done and/or is regularly improved. The document representation also has support to improve this further. I propose to close this one and move to more focused issues. |
I believe none of the points in the original comment have been done. We do have |
Since #615 the arrows Other than that I concur with @Drup's last comment. The markup for definitions still needs more work w.r.t. break points but in its current state and with respect to all the changes that have occured since it was opened I no longer find this issue to be useful to work with. |
Note the following is about definitions not code fences.
The markup for definitions could be more semantic and the layout should be improved as it can be pretty bad on long definitions since it may wrap anywhere, something a sensitive OCaml programmer would never do.
First these things would be good to have:
<code>
tag.class
ified via a<span>
.class
ified via a<span>
the same way they are classified in textualcode
spans.Regarding the layout there are at least two solutions that can be tried.
a)
<pre>
can be used instead of<div class="def">
and all the formatting is done manually (this is the wayocamldoc
proceeds), the disadvantage is that it will not be responsive to the page width.b)
<div class = "def">
is kept but we try to control the line breaking algorithm by only using spaces at the places where we would like to break (e.g. before|
, after->
) and using non breaking spaces U+00A0 where we don't want to break. I should then be able to make an indent via css'text-indent
.I have a slight preference to try what b) can give us.
The text was updated successfully, but these errors were encountered: