1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-20 09:18:48 +02:00

Improve linebreak / paragraph behavior.

This commit is contained in:
epriestley 2011-04-10 14:07:00 -07:00
parent a7ac8a04e0
commit 24d01d39c6
4 changed files with 13 additions and 6 deletions

View file

@ -21,6 +21,8 @@ class DifferentialMarkupEngineFactory {
public function newDifferentialCommentMarkupEngine() { public function newDifferentialCommentMarkupEngine() {
$engine = new PhutilRemarkupEngine(); $engine = new PhutilRemarkupEngine();
$engine->setConfig('preserve-linebreaks', true);
$rules = array(); $rules = array();
$rules[] = new PhutilRemarkupRuleEscapeRemarkup(); $rules[] = new PhutilRemarkupRuleEscapeRemarkup();
$rules[] = new PhutilRemarkupRuleHyperlink(); $rules[] = new PhutilRemarkupRuleHyperlink();

View file

@ -156,7 +156,11 @@ final class DifferentialRevisionCommentView extends AphrontView {
$inline_render[] = $inline_render[] =
'<tr>'. '<tr>'.
'<td class="inline-line-number">'.$lines.'</td>'. '<td class="inline-line-number">'.$lines.'</td>'.
'<td>'.$inline_content.'</td>'. '<td>'.
'<div class="phabricator-remarkup">'.
$inline_content.
'</div>'.
'</td>'.
'</tr>'; '</tr>';
} }
} }

View file

@ -42,10 +42,7 @@
overflow: hidden; overflow: hidden;
} }
.differential-comment-core .phabricator-remarkup p { .differential-comment-content .phabricator-remarkup code,
margin: 0.35em 0;
}
.differential-comment-core .phabricator-remarkup code { .differential-comment-core .phabricator-remarkup code {
width: 88ex; width: 88ex;
width: 81ch; width: 81ch;

View file

@ -7,7 +7,11 @@
} }
.phabricator-remarkup p { .phabricator-remarkup p {
margin: 0 0 .75em; margin: 0 0 1em;
}
.phabricator-remarkup p:last-child {
margin-bottom: 0;
} }
.phabricator-remarkup code { .phabricator-remarkup code {