mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 00:42:41 +01:00
Minor remarkup updates
Summary: - Update documentation for changes in D1148. - Link to Remarkup documentation from Maniphest. - Support "Note:" syntax in Phabricator (previously, it was only supported in Diviner, but I've found it pretty good and useful). Test Plan: Regenerated and perused documentation; made a "NOTE:". Reviewers: btrahan, broofa, fugalh, jungejason, nh, aran Reviewed By: btrahan CC: aran, btrahan Differential Revision: 1149
This commit is contained in:
parent
dfffc78d38
commit
c53511e9b4
6 changed files with 165 additions and 129 deletions
|
@ -211,69 +211,6 @@ celerity_register_resource_map(array(
|
|||
),
|
||||
'disk' => '/rsrc/css/application/differential/add-comment.css',
|
||||
),
|
||||
'differential-revision-comment-css' =>
|
||||
array(
|
||||
'uri' => '/res/9fb8013b/rsrc/css/application/differential/revision-comment.css',
|
||||
'type' => 'css',
|
||||
'requires' =>
|
||||
array(
|
||||
),
|
||||
'disk' => '/rsrc/css/application/differential/revision-comment.css',
|
||||
),
|
||||
'differential-revision-comment-list-css' =>
|
||||
array(
|
||||
'uri' => '/res/3b31faa3/rsrc/css/application/differential/revision-comment-list.css',
|
||||
'type' => 'css',
|
||||
'requires' =>
|
||||
array(
|
||||
),
|
||||
'disk' => '/rsrc/css/application/differential/revision-comment-list.css',
|
||||
),
|
||||
'differential-revision-detail-css' =>
|
||||
array(
|
||||
'uri' => '/res/caa89172/rsrc/css/application/differential/revision-detail.css',
|
||||
'type' => 'css',
|
||||
'requires' =>
|
||||
array(
|
||||
),
|
||||
'disk' => '/rsrc/css/application/differential/revision-detail.css',
|
||||
),
|
||||
'differential-revision-history-css' =>
|
||||
array(
|
||||
'uri' => '/res/0d7d515d/rsrc/css/application/differential/revision-history.css',
|
||||
'type' => 'css',
|
||||
'requires' =>
|
||||
array(
|
||||
),
|
||||
'disk' => '/rsrc/css/application/differential/revision-history.css',
|
||||
),
|
||||
'differential-table-of-contents-css' =>
|
||||
array(
|
||||
'uri' => '/res/d173445b/rsrc/css/application/differential/table-of-contents.css',
|
||||
'type' => 'css',
|
||||
'requires' =>
|
||||
array(
|
||||
),
|
||||
'disk' => '/rsrc/css/application/differential/table-of-contents.css',
|
||||
),
|
||||
'diffusion-commit-view-css' =>
|
||||
array(
|
||||
'uri' => '/res/bc39d876/rsrc/css/application/diffusion/commit-view.css',
|
||||
'type' => 'css',
|
||||
'requires' =>
|
||||
array(
|
||||
),
|
||||
'disk' => '/rsrc/css/application/diffusion/commit-view.css',
|
||||
),
|
||||
'diffusion-source-css' =>
|
||||
array(
|
||||
'uri' => '/res/db4566b6/rsrc/css/application/diffusion/diffusion-source.css',
|
||||
'type' => 'css',
|
||||
'requires' =>
|
||||
array(
|
||||
),
|
||||
'disk' => '/rsrc/css/application/diffusion/diffusion-source.css',
|
||||
),
|
||||
'files-css' =>
|
||||
array(
|
||||
'uri' => '/res/a265a77d/rsrc/css/application/files/files.css',
|
||||
|
@ -292,25 +229,6 @@ celerity_register_resource_map(array(
|
|||
),
|
||||
'disk' => '/rsrc/css/application/herald/herald.css',
|
||||
),
|
||||
'herald-rule-editor' =>
|
||||
array(
|
||||
'uri' => '/res/4d6dff2b/rsrc/js/application/herald/HeraldRuleEditor.js',
|
||||
'type' => 'js',
|
||||
'requires' =>
|
||||
array(
|
||||
0 => 'multirow-row-manager',
|
||||
1 => 'javelin-install',
|
||||
2 => 'javelin-typeahead',
|
||||
3 => 'javelin-util',
|
||||
4 => 'javelin-dom',
|
||||
5 => 'javelin-tokenizer',
|
||||
6 => 'javelin-typeahead-preloaded-source',
|
||||
7 => 'javelin-stratcom',
|
||||
8 => 'javelin-json',
|
||||
9 => 'phabricator-prefab',
|
||||
),
|
||||
'disk' => '/rsrc/js/application/herald/HeraldRuleEditor.js',
|
||||
),
|
||||
'herald-test-css' =>
|
||||
array(
|
||||
'uri' => '/res/c0cd6bdb/rsrc/css/application/herald/herald-test.css',
|
||||
|
@ -395,6 +313,99 @@ celerity_register_resource_map(array(
|
|||
),
|
||||
'disk' => '/rsrc/js/application/countdown/timer.js',
|
||||
),
|
||||
0 =>
|
||||
array(
|
||||
'uri' => '/res/b6096fdd/rsrc/js/javelin/lib/__tests__/URI.js',
|
||||
'type' => 'js',
|
||||
'requires' =>
|
||||
array(
|
||||
0 => 'javelin-uri',
|
||||
1 => 'javelin-php-serializer',
|
||||
),
|
||||
'disk' => '/rsrc/js/javelin/lib/__tests__/URI.js',
|
||||
),
|
||||
'differential-revision-comment-css' =>
|
||||
array(
|
||||
'uri' => '/res/9fb8013b/rsrc/css/application/differential/revision-comment.css',
|
||||
'type' => 'css',
|
||||
'requires' =>
|
||||
array(
|
||||
),
|
||||
'disk' => '/rsrc/css/application/differential/revision-comment.css',
|
||||
),
|
||||
'differential-revision-comment-list-css' =>
|
||||
array(
|
||||
'uri' => '/res/3b31faa3/rsrc/css/application/differential/revision-comment-list.css',
|
||||
'type' => 'css',
|
||||
'requires' =>
|
||||
array(
|
||||
),
|
||||
'disk' => '/rsrc/css/application/differential/revision-comment-list.css',
|
||||
),
|
||||
'differential-revision-detail-css' =>
|
||||
array(
|
||||
'uri' => '/res/caa89172/rsrc/css/application/differential/revision-detail.css',
|
||||
'type' => 'css',
|
||||
'requires' =>
|
||||
array(
|
||||
),
|
||||
'disk' => '/rsrc/css/application/differential/revision-detail.css',
|
||||
),
|
||||
'differential-revision-history-css' =>
|
||||
array(
|
||||
'uri' => '/res/0d7d515d/rsrc/css/application/differential/revision-history.css',
|
||||
'type' => 'css',
|
||||
'requires' =>
|
||||
array(
|
||||
),
|
||||
'disk' => '/rsrc/css/application/differential/revision-history.css',
|
||||
),
|
||||
'differential-table-of-contents-css' =>
|
||||
array(
|
||||
'uri' => '/res/d173445b/rsrc/css/application/differential/table-of-contents.css',
|
||||
'type' => 'css',
|
||||
'requires' =>
|
||||
array(
|
||||
),
|
||||
'disk' => '/rsrc/css/application/differential/table-of-contents.css',
|
||||
),
|
||||
'diffusion-commit-view-css' =>
|
||||
array(
|
||||
'uri' => '/res/bc39d876/rsrc/css/application/diffusion/commit-view.css',
|
||||
'type' => 'css',
|
||||
'requires' =>
|
||||
array(
|
||||
),
|
||||
'disk' => '/rsrc/css/application/diffusion/commit-view.css',
|
||||
),
|
||||
'diffusion-source-css' =>
|
||||
array(
|
||||
'uri' => '/res/db4566b6/rsrc/css/application/diffusion/diffusion-source.css',
|
||||
'type' => 'css',
|
||||
'requires' =>
|
||||
array(
|
||||
),
|
||||
'disk' => '/rsrc/css/application/diffusion/diffusion-source.css',
|
||||
),
|
||||
'herald-rule-editor' =>
|
||||
array(
|
||||
'uri' => '/res/4d6dff2b/rsrc/js/application/herald/HeraldRuleEditor.js',
|
||||
'type' => 'js',
|
||||
'requires' =>
|
||||
array(
|
||||
0 => 'multirow-row-manager',
|
||||
1 => 'javelin-install',
|
||||
2 => 'javelin-typeahead',
|
||||
3 => 'javelin-util',
|
||||
4 => 'javelin-dom',
|
||||
5 => 'javelin-tokenizer',
|
||||
6 => 'javelin-typeahead-preloaded-source',
|
||||
7 => 'javelin-stratcom',
|
||||
8 => 'javelin-json',
|
||||
9 => 'phabricator-prefab',
|
||||
),
|
||||
'disk' => '/rsrc/js/application/herald/HeraldRuleEditor.js',
|
||||
),
|
||||
'javelin-behavior-dark-console' =>
|
||||
array(
|
||||
'uri' => '/res/c80156c4/rsrc/js/application/core/behavior-dark-console.js',
|
||||
|
@ -819,16 +830,6 @@ celerity_register_resource_map(array(
|
|||
),
|
||||
'disk' => '/rsrc/js/javelin/ext/reactor/core/DynVal.js',
|
||||
),
|
||||
0 =>
|
||||
array(
|
||||
'uri' => '/res/11520eb6/rsrc/js/javelin/lib/__tests__/JSON.js',
|
||||
'type' => 'js',
|
||||
'requires' =>
|
||||
array(
|
||||
0 => 'javelin-json',
|
||||
),
|
||||
'disk' => '/rsrc/js/javelin/lib/__tests__/JSON.js',
|
||||
),
|
||||
'javelin-event' =>
|
||||
array(
|
||||
'uri' => '/res/f42fa6ea/rsrc/js/javelin/core/Event.js',
|
||||
|
@ -1393,7 +1394,7 @@ celerity_register_resource_map(array(
|
|||
),
|
||||
'phabricator-remarkup-css' =>
|
||||
array(
|
||||
'uri' => '/res/d0d50cdc/rsrc/css/core/remarkup.css',
|
||||
'uri' => '/res/78f26382/rsrc/css/core/remarkup.css',
|
||||
'type' => 'css',
|
||||
'requires' =>
|
||||
array(
|
||||
|
@ -1696,23 +1697,7 @@ celerity_register_resource_map(array(
|
|||
'uri' => '/res/pkg/982ad44b/differential.pkg.js',
|
||||
'type' => 'js',
|
||||
),
|
||||
'bbe7e6f7' =>
|
||||
array(
|
||||
'name' => 'typeahead.pkg.js',
|
||||
'symbols' =>
|
||||
array(
|
||||
0 => 'javelin-typeahead',
|
||||
1 => 'javelin-typeahead-normalizer',
|
||||
2 => 'javelin-typeahead-source',
|
||||
3 => 'javelin-typeahead-preloaded-source',
|
||||
4 => 'javelin-typeahead-ondemand-source',
|
||||
5 => 'javelin-tokenizer',
|
||||
6 => 'javelin-behavior-aphront-basic-tokenizer',
|
||||
),
|
||||
'uri' => '/res/pkg/bbe7e6f7/typeahead.pkg.js',
|
||||
'type' => 'js',
|
||||
),
|
||||
'fa189780' =>
|
||||
'aa531d70' =>
|
||||
array(
|
||||
'name' => 'core.pkg.css',
|
||||
'symbols' =>
|
||||
|
@ -1733,21 +1718,37 @@ celerity_register_resource_map(array(
|
|||
13 => 'phabricator-remarkup-css',
|
||||
14 => 'syntax-highlighting-css',
|
||||
),
|
||||
'uri' => '/res/pkg/fa189780/core.pkg.css',
|
||||
'uri' => '/res/pkg/aa531d70/core.pkg.css',
|
||||
'type' => 'css',
|
||||
),
|
||||
'bbe7e6f7' =>
|
||||
array(
|
||||
'name' => 'typeahead.pkg.js',
|
||||
'symbols' =>
|
||||
array(
|
||||
0 => 'javelin-typeahead',
|
||||
1 => 'javelin-typeahead-normalizer',
|
||||
2 => 'javelin-typeahead-source',
|
||||
3 => 'javelin-typeahead-preloaded-source',
|
||||
4 => 'javelin-typeahead-ondemand-source',
|
||||
5 => 'javelin-tokenizer',
|
||||
6 => 'javelin-behavior-aphront-basic-tokenizer',
|
||||
),
|
||||
'uri' => '/res/pkg/bbe7e6f7/typeahead.pkg.js',
|
||||
'type' => 'js',
|
||||
),
|
||||
),
|
||||
'reverse' =>
|
||||
array(
|
||||
'aphront-crumbs-view-css' => 'fa189780',
|
||||
'aphront-dialog-view-css' => 'fa189780',
|
||||
'aphront-form-view-css' => 'fa189780',
|
||||
'aphront-list-filter-view-css' => 'fa189780',
|
||||
'aphront-panel-view-css' => 'fa189780',
|
||||
'aphront-side-nav-view-css' => 'fa189780',
|
||||
'aphront-table-view-css' => 'fa189780',
|
||||
'aphront-tokenizer-control-css' => 'fa189780',
|
||||
'aphront-typeahead-control-css' => 'fa189780',
|
||||
'aphront-crumbs-view-css' => 'aa531d70',
|
||||
'aphront-dialog-view-css' => 'aa531d70',
|
||||
'aphront-form-view-css' => 'aa531d70',
|
||||
'aphront-list-filter-view-css' => 'aa531d70',
|
||||
'aphront-panel-view-css' => 'aa531d70',
|
||||
'aphront-side-nav-view-css' => 'aa531d70',
|
||||
'aphront-table-view-css' => 'aa531d70',
|
||||
'aphront-tokenizer-control-css' => 'aa531d70',
|
||||
'aphront-typeahead-control-css' => 'aa531d70',
|
||||
'differential-changeset-view-css' => '6ed92e8c',
|
||||
'differential-core-view-css' => '6ed92e8c',
|
||||
'differential-revision-add-comment-css' => '6ed92e8c',
|
||||
|
@ -1784,13 +1785,13 @@ celerity_register_resource_map(array(
|
|||
'javelin-util' => '22c00e0e',
|
||||
'javelin-vector' => '22c00e0e',
|
||||
'javelin-workflow' => '2d40bd98',
|
||||
'phabricator-core-buttons-css' => 'fa189780',
|
||||
'phabricator-core-css' => 'fa189780',
|
||||
'phabricator-directory-css' => 'fa189780',
|
||||
'phabricator-core-buttons-css' => 'aa531d70',
|
||||
'phabricator-core-css' => 'aa531d70',
|
||||
'phabricator-directory-css' => 'aa531d70',
|
||||
'phabricator-keyboard-shortcut' => '2d40bd98',
|
||||
'phabricator-keyboard-shortcut-manager' => '2d40bd98',
|
||||
'phabricator-remarkup-css' => 'fa189780',
|
||||
'phabricator-standard-page-view' => 'fa189780',
|
||||
'syntax-highlighting-css' => 'fa189780',
|
||||
'phabricator-remarkup-css' => 'aa531d70',
|
||||
'phabricator-standard-page-view' => 'aa531d70',
|
||||
'syntax-highlighting-css' => 'aa531d70',
|
||||
),
|
||||
));
|
||||
|
|
|
@ -342,6 +342,9 @@ class ManiphestTaskDetailController extends ManiphestController {
|
|||
unset($resolution_types[ManiphestTaskStatus::STATUS_CLOSED_SPITE]);
|
||||
}
|
||||
|
||||
$remarkup_href = PhabricatorEnv::getDoclink(
|
||||
'article/Remarkup_Reference.html');
|
||||
|
||||
$comment_form = new AphrontFormView();
|
||||
$comment_form
|
||||
->setUser($user)
|
||||
|
@ -404,6 +407,14 @@ class ManiphestTaskDetailController extends ManiphestController {
|
|||
->setLabel('Comments')
|
||||
->setName('comments')
|
||||
->setValue($draft_text)
|
||||
->setCaption(
|
||||
phutil_render_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => $remarkup_href,
|
||||
'target' => '_blank',
|
||||
),
|
||||
'Remarkup Syntax Reference'))
|
||||
->setID('transaction-comments'))
|
||||
->appendChild(
|
||||
id(new AphrontFormDragAndDropUploadControl())
|
||||
|
|
|
@ -144,6 +144,7 @@ class PhabricatorMarkupEngine {
|
|||
$blocks[] = new PhutilRemarkupEngineRemarkupHeaderBlockRule();
|
||||
$blocks[] = new PhutilRemarkupEngineRemarkupListBlockRule();
|
||||
$blocks[] = new PhutilRemarkupEngineRemarkupCodeBlockRule();
|
||||
$blocks[] = new PhutilRemarkupEngineRemarkupNoteBlockRule();
|
||||
$blocks[] = new PhutilRemarkupEngineRemarkupDefaultBlockRule();
|
||||
|
||||
$custom_block_rule_classes = $options['custom-block'];
|
||||
|
|
|
@ -25,6 +25,7 @@ phutil_require_module('phutil', 'markup/engine/remarkup/blockrule/remarkupcode')
|
|||
phutil_require_module('phutil', 'markup/engine/remarkup/blockrule/remarkupdefault');
|
||||
phutil_require_module('phutil', 'markup/engine/remarkup/blockrule/remarkupheader');
|
||||
phutil_require_module('phutil', 'markup/engine/remarkup/blockrule/remarkuplist');
|
||||
phutil_require_module('phutil', 'markup/engine/remarkup/blockrule/remarkupnote');
|
||||
phutil_require_module('phutil', 'markup/engine/remarkup/blockrule/remarkupquotes');
|
||||
phutil_require_module('phutil', 'markup/engine/remarkup/markuprule/bold');
|
||||
phutil_require_module('phutil', 'markup/engine/remarkup/markuprule/escapehtml');
|
||||
|
|
|
@ -25,8 +25,8 @@ formatting text in Remarkup:
|
|||
{F123} # Embed Images
|
||||
[[wiki page]] # Link to Phriction
|
||||
@username # Mention a user
|
||||
Indent two spaces for code.
|
||||
Indent two spaces with "-" for lists.
|
||||
Use "- " or "* " for list items.
|
||||
Use ``` or indent two spaces for code.
|
||||
|
||||
= Basic Styling =
|
||||
|
||||
|
@ -49,23 +49,34 @@ Make **headers** like this:
|
|||
|
||||
This produces headers like the ones in this document.
|
||||
|
||||
Make **lists** by indenting two spaces and beginning each item with a "-":
|
||||
Make **lists** by beginning each item with a "-" or a "*":
|
||||
|
||||
lang=text
|
||||
- milk
|
||||
- eggs
|
||||
- bread
|
||||
|
||||
* duck
|
||||
* duck
|
||||
* goose
|
||||
|
||||
This produces a list like this:
|
||||
|
||||
- milk
|
||||
- eggs
|
||||
- bread
|
||||
|
||||
(Note that you need to put a space after the "-" or "*".)
|
||||
|
||||
Make **code blocks** by indenting two spaces:
|
||||
|
||||
f(x, y);
|
||||
|
||||
You can also use three backticks to enclose the code block:
|
||||
|
||||
```f(x, y);
|
||||
g(f);```
|
||||
|
||||
You can specify a language for syntax highlighting with "lang=xxx":
|
||||
|
||||
lang=text
|
||||
|
@ -94,6 +105,10 @@ This produces a block like this:
|
|||
global $$variable_variable;
|
||||
}
|
||||
|
||||
You can also use "NOTE:" to call out an important idea.
|
||||
|
||||
NOTE: Don't cross the streams!
|
||||
|
||||
= Linking URIs =
|
||||
|
||||
URIs are automatically linked: http://phabricator.org/
|
||||
|
|
|
@ -119,3 +119,10 @@
|
|||
font-weight: bold;
|
||||
background: #ffaaaa;
|
||||
}
|
||||
|
||||
.phabricator-remarkup .remarkup-note {
|
||||
margin: 1em 1.5em;
|
||||
padding: 0.5em 1em;
|
||||
border: 1px solid #ddddff;
|
||||
background: #f3f3ff;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue