-
Notifications
You must be signed in to change notification settings - Fork 81
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
support clipping (or scrolling) long errors #662
Comments
cc @armanbilge |
@erikerlandson do you have a branch I can look at? We can support this at the rendering level by adding a custom CSS style. Basically something like this: pre {
max-height: 100px;
overflow: scroll;
} |
@armanbilge latest is merged into |
@armanbilge thanks! For reference, what I ultimately ended up doing was this: /* when mdoc renders "long" comments, clip them and provide a scrollbar */
.comment {
/* set display as block or the other settings don't work */
display: block;
/* most comments are short, and display normally */
max-height: 100px;
/* add a scrollbar only when necessary */
overflow: auto;
} Which adds a scrollbar only for "long" comments, like this: |
Might be useful to have a special class for "multi-line-comment" or "mdoc-output-comment" to distinguish between comments the programmer wrote and comments generated by mdoc itself. Or some new mdoc tag. |
Possibly not related but now seeing this strange behavior: |
I have a code block that creates an error, but the long length of the error is a bit distracting.
Is there a way to tell
mdoc
to clip the error message to the firstn
lines, or just tell it to have a maximum code block height,with a scroll bar? Setting something like
mdoc:height=10
doesn't fix this particular problem.Screen-shot of my long error:
The text was updated successfully, but these errors were encountered: