-
Notifications
You must be signed in to change notification settings - Fork 41
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
Minor templating issues #212
Labels
bug
Something isn't working
Comments
Hey @rhartmann thanks for reporting these issues! subissue 2 and subissue 3 have been fixed. Will look into the preformatted blocks next. |
redimp
added a commit
that referenced
this issue
Mar 5, 2025
redimp
added a commit
that referenced
this issue
Mar 6, 2025
Added An OtterwikiBlockParser to override mistunes default parsing. This was brought up in #212.
redimp
added a commit
that referenced
this issue
Mar 9, 2025
redimp
added a commit
that referenced
this issue
Mar 9, 2025
Added An OtterwikiBlockParser to override mistunes default parsing. This was brought up in #212.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey, I was wondering why my preformatted blocks look weird, so I looked at the HTML source code and found three issues. I'll squash them into one issue.
Issue 1: Preformatted blocks have a trailing newline
Expected result:
Or maybe with a single newline:
Actual result:
This leads to ugly trailing empty lines:
Note though, simply trimming whitespace hurts Otters! 😉 It should render the exact spaces and newlines of the preformatted text block.
This does not happen to triple-backticked code blocks.
Btw, this time around, Mistune also has a noticable difference. I tried this in the Python CLI:
I don't know if that is an issue though, as it is an additional code element within the pre.
For reference, rendered by GitHub
No trailing newline here.
Issue 2: Template consumes too many spaces
otterwiki/otterwiki/templates/layout.html
Line 70 in ba61b78
The
{%-elif
consumes the leading space. The{%-endif-%}
consumes the leading and trailing space.Hence, the result (when sidebar is visible) misses the space between the attributes:
Issue 3: i-element with weird empty attribute
otterwiki/otterwiki/templates/snippets/syntax.html
Line 240 in ba61b78
The
<i "="" alt="Copy to clipboard" ...
seems wrong.The text was updated successfully, but these errors were encountered: