adhocracy
adhocracy copied to clipboard
Linebreak in show_more
The "Show more..." markdown extension we introduced in #120 has some minor bug which I guess keeps people from using it.
- Expected behavior: replace
(((text)))with a "[show more]" button within the current paragraph (<p>) - What happens instead: The paragraph is closed before the show more div which results in a line-break
This happens because we use a preprocessor that replaces (((text))) by html. Markdown the correctly closes the paragraph before that html and opens a new one afterwards. I guess it is not possible to solve this using a preprocessor.
It also doesn't seem to be possible to hack a fix in css. I thought about setting display: inline in the p element right before .showmore. But while it is possible to select the following sibling, this is not the case for the previous one.
I just realized that the behavior makes complete sense if you interpret (((...))) as a block element. As most block elements in markdown are seperated by other elements by a blank line this is not obvious. So we should make up our minds which one it is and adopt the docs accordingly. This is also important for #517.
I did some work on this some months back that is not linked here yet: e8d8ef0