Improve linebreak / paragraph behavior.
This commit is contained in:
@@ -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();
|
||||||
|
|||||||
@@ -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>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user