diff --git a/conf/default.conf.php b/conf/default.conf.php
index e811b54f76..cc81db6019 100644
--- a/conf/default.conf.php
+++ b/conf/default.conf.php
@@ -348,6 +348,9 @@ return array(
// -- Remarkup -------------------------------------------------------------- //
+ // If you enable this, linked YouTube videos will be embeded inline. This has
+ // mild security implications (you'll leak referrers to YouTube) and is pretty
+ // silly (but sort of awesome).
'remarkup.enable-embedded-youtube' => false,
// -- Customization --------------------------------------------------------- //
diff --git a/src/__celerity_resource_map__.php b/src/__celerity_resource_map__.php
index 1cf376dc69..15444ace93 100644
--- a/src/__celerity_resource_map__.php
+++ b/src/__celerity_resource_map__.php
@@ -931,7 +931,7 @@ celerity_register_resource_map(array(
),
'phabricator-remarkup-css' =>
array(
- 'uri' => '/res/fc827787/rsrc/css/core/remarkup.css',
+ 'uri' => '/res/774d4078/rsrc/css/core/remarkup.css',
'type' => 'css',
'requires' =>
array(
@@ -1002,30 +1002,6 @@ celerity_register_resource_map(array(
'uri' => '/res/pkg/122a6b6d/workflow.pkg.js',
'type' => 'js',
),
- '196b23d4' =>
- array (
- 'name' => 'core.pkg.css',
- 'symbols' =>
- array (
- 0 => 'phabricator-core-css',
- 1 => 'phabricator-core-buttons-css',
- 2 => 'phabricator-standard-page-view',
- 3 => 'aphront-dialog-view-css',
- 4 => 'aphront-form-view-css',
- 5 => 'aphront-panel-view-css',
- 6 => 'aphront-side-nav-view-css',
- 7 => 'aphront-table-view-css',
- 8 => 'aphront-crumbs-view-css',
- 9 => 'aphront-tokenizer-control-css',
- 10 => 'aphront-typeahead-control-css',
- 11 => 'aphront-list-filter-view-css',
- 12 => 'phabricator-directory-css',
- 13 => 'phabricator-remarkup-css',
- 14 => 'syntax-highlighting-css',
- ),
- 'uri' => '/res/pkg/196b23d4/core.pkg.css',
- 'type' => 'css',
- ),
'1ac25e8a' =>
array (
'name' => 'differential.pkg.css',
@@ -1059,6 +1035,30 @@ celerity_register_resource_map(array(
'uri' => '/res/pkg/33f413ef/typeahead.pkg.js',
'type' => 'js',
),
+ '7fce98ed' =>
+ array (
+ 'name' => 'core.pkg.css',
+ 'symbols' =>
+ array (
+ 0 => 'phabricator-core-css',
+ 1 => 'phabricator-core-buttons-css',
+ 2 => 'phabricator-standard-page-view',
+ 3 => 'aphront-dialog-view-css',
+ 4 => 'aphront-form-view-css',
+ 5 => 'aphront-panel-view-css',
+ 6 => 'aphront-side-nav-view-css',
+ 7 => 'aphront-table-view-css',
+ 8 => 'aphront-crumbs-view-css',
+ 9 => 'aphront-tokenizer-control-css',
+ 10 => 'aphront-typeahead-control-css',
+ 11 => 'aphront-list-filter-view-css',
+ 12 => 'phabricator-directory-css',
+ 13 => 'phabricator-remarkup-css',
+ 14 => 'syntax-highlighting-css',
+ ),
+ 'uri' => '/res/pkg/7fce98ed/core.pkg.css',
+ 'type' => 'css',
+ ),
'd985d27a' =>
array (
'name' => 'javelin.pkg.js',
@@ -1095,15 +1095,15 @@ celerity_register_resource_map(array(
),
'reverse' =>
array (
- 'aphront-crumbs-view-css' => '196b23d4',
- 'aphront-dialog-view-css' => '196b23d4',
- 'aphront-form-view-css' => '196b23d4',
- 'aphront-list-filter-view-css' => '196b23d4',
- 'aphront-panel-view-css' => '196b23d4',
- 'aphront-side-nav-view-css' => '196b23d4',
- 'aphront-table-view-css' => '196b23d4',
- 'aphront-tokenizer-control-css' => '196b23d4',
- 'aphront-typeahead-control-css' => '196b23d4',
+ 'aphront-crumbs-view-css' => '7fce98ed',
+ 'aphront-dialog-view-css' => '7fce98ed',
+ 'aphront-form-view-css' => '7fce98ed',
+ 'aphront-list-filter-view-css' => '7fce98ed',
+ 'aphront-panel-view-css' => '7fce98ed',
+ 'aphront-side-nav-view-css' => '7fce98ed',
+ 'aphront-table-view-css' => '7fce98ed',
+ 'aphront-tokenizer-control-css' => '7fce98ed',
+ 'aphront-typeahead-control-css' => '7fce98ed',
'differential-changeset-view-css' => '1ac25e8a',
'differential-core-view-css' => '1ac25e8a',
'differential-revision-add-comment-css' => '1ac25e8a',
@@ -1138,11 +1138,11 @@ celerity_register_resource_map(array(
'javelin-util' => 'd985d27a',
'javelin-vector' => 'd985d27a',
'javelin-workflow' => '122a6b6d',
- 'phabricator-core-buttons-css' => '196b23d4',
- 'phabricator-core-css' => '196b23d4',
- 'phabricator-directory-css' => '196b23d4',
- 'phabricator-remarkup-css' => '196b23d4',
- 'phabricator-standard-page-view' => '196b23d4',
- 'syntax-highlighting-css' => '196b23d4',
+ 'phabricator-core-buttons-css' => '7fce98ed',
+ 'phabricator-core-css' => '7fce98ed',
+ 'phabricator-directory-css' => '7fce98ed',
+ 'phabricator-remarkup-css' => '7fce98ed',
+ 'phabricator-standard-page-view' => '7fce98ed',
+ 'syntax-highlighting-css' => '7fce98ed',
),
));
diff --git a/src/docs/userguide/remarkup.diviner b/src/docs/userguide/remarkup.diviner
new file mode 100644
index 0000000000..42263f91f6
--- /dev/null
+++ b/src/docs/userguide/remarkup.diviner
@@ -0,0 +1,122 @@
+@title Remarkup Reference
+@group userguide
+
+Explains how to make bold text, etc.
+
+= Overview =
+
+Phabricator uses a lightweight markup language called "Remarkup", similar to
+other lightweight markup langauges like Markdown and Wiki markup.
+
+This document describes how to format text using Remarkup.
+
+= Basic Styling =
+
+Format **basic text styles** like this:
+
+ **bold text**
+ //italic text//
+ ##monospaced text##
+
+Those produce **bold text**, //italic text// and ##monospaced text##,
+respectively.
+
+= Layout =
+
+Make **headers** like this:
+
+ = Large Header =
+ == Smaller Header ==
+ ===== Very Small Header =====
+
+This produces headers like the ones in this document.
+
+Make **lists** by indenting two spaces and beginning each item with a "-":
+
+ lang=demo
+ - milk
+ - eggs
+ - bread
+
+This produces a list like this:
+
+ - milk
+ - eggs
+ - bread
+
+Make **code blocks** by indenting two spaces:
+
+ f(x, y);
+
+You can specify a language for syntax highlighting with "lang=xxx":
+
+ lang=demo
+ lang=html
+ ...
+
+This will highlight the block using a highlighter for that language, if one is
+available (in most cases, this means you need to configure Pygments):
+
+ lang=html
+ ...
+
+You can also use a "COUNTEREXAMPLE" header to show that a block of code is
+bad and shouldn't be copied:
+
+ lang=demo
+ COUNTEREXAMPLE
+ function f() {
+ global $$variable_variable;
+ }
+
+This produces a block like this:
+
+ COUNTEREXAMPLE
+ function f() {
+ global $$variable_variable;
+ }
+
+= Linking URIs =
+
+URIs are automatically linked: http://phabricator.org/
+
+If you have a URI with problematic characters in it, like
+"##http://comma.org/,##", you can surround it with angle brackets:
+
+
+
+This will force the parser to consume the whole URI:
+
+= Linking to Objects =
+
+You can link to Differential revisions, Diffusion commits and Maniphest tasks
+by mentioning the name of an object:
+
+ D123 # Link to Differential revision D123
+ rX123 # Link to SVN commit 123 from the "X" repository
+ rXaf3192cd5 # Link to Git commit "af3192cd5..." from the "X" repository.
+ # You must specify at least 7 characters of the hash.
+ T123 # Link to Maniphest task T123
+
+= Quoting Text =
+
+To quote text, preface it with an ">":
+
+ > This is quoted text.
+
+This appears like this:
+
+> This is quoted text.
+
+= Embedding Media =
+
+If you set configuration flags, you can embed media directly in text:
+
+ - **files.enable-proxy**: allows you to paste in image URLs and have them
+ render inline.
+ - **remarkup.enable-embedded-youtube**: allows you to paste in YouTube videos
+ and have them render inline.
+
+These options are disabled by default because they have security and/or
+silliness implications, read their descriptions in ##default.conf.php## before
+enabling them.
\ No newline at end of file
diff --git a/webroot/rsrc/css/core/remarkup.css b/webroot/rsrc/css/core/remarkup.css
index 77ad9a2698..a2f17799ce 100644
--- a/webroot/rsrc/css/core/remarkup.css
+++ b/webroot/rsrc/css/core/remarkup.css
@@ -31,6 +31,12 @@
background-color: #ffaaaa;
}
+.phabricator-remarkup tt {
+ color: #333333;
+ background: #ebebeb;
+ padding: 0 .25em;
+}
+
.phabricator-remarkup ul {
list-style: disc;
margin: 1em 0 1em 3em;