Page MenuHomePhabricator

Cannot reduce the number of lines using backticks and lines=2
Closed, InvalidPublic

Description

Reproduction steps:

  • In a comment enter the content of this paste : P2029
  • See the preview
  • Notice that the foobar10 is fully visible while only 2 lines were expected to be seen

Use case:
When deploying, a bot post a message in conpherence. Some part of the message are quite rarely used, so we would like to have it hidden by default.
Maybe the solution is something different from this bug.

Versions:

phabricator 71de5f2da2551a687657ca16cec83c42e95e05e2 (Sun, Jan 1) 
arcanist c243cbbd9fc701ca9555672ea5c1666ea154898f (Thu, Dec 29)
phutil 5ac2ca1214890d865bc57fab2715a322fdf02ab6 (Tue, Dec 6)

Related Objects

Event Timeline

magnetik created this task.Jan 3 2017, 3:21 PM
magnetik mentioned this in Z1336: General Chat.
magnetik updated the task description. (Show Details)Jan 3 2017, 3:45 PM
epriestley closed this task as Invalid.Jan 3 2017, 3:56 PM
epriestley added a subscriber: epriestley.

This is not a bug. The element has a minimum height because viewing or selecting text from a tiny element would create usability issues: imagine trying to select 30 lines from the middle of a 100-line block with lines=2.

There isn't enough information about your use case to suggest a workaround. Feel free to file a new feature request describing your root problem.

Specifically, the limit is enforced here. You could remove this limit locally if you are not concerned about the usability of the result:

https://secure.phabricator.com/source/libphutil/browse/master/src/markup/engine/remarkup/blockrule/PhutilRemarkupCodeBlockRule.php;5ac2ca1214890d865bc57fab2715a322fdf02ab6$222-231