adhocracy icon indicating copy to clipboard operation
adhocracy copied to clipboard

Linebreak in show_more

Open xi opened this issue 11 years ago • 3 comments

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.

xi avatar Jul 31 '13 11:07 xi

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.

xi avatar Jul 31 '13 11:07 xi

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.

xi avatar Aug 16 '13 17:08 xi

I did some work on this some months back that is not linked here yet: e8d8ef0

xi avatar Apr 07 '14 15:04 xi