Summary:
Provide a {T123} syntax which pulls in the entire name of an object, not just a
link to it. A major use for this is organizing projects using wiki pages. Since
handle links show object status now, this lets you organize stuff in an ad-hoc
way and get a reasonable overview of it. We can make handles richer in the
future, too.
The performance on this isn't perfect (it adds some potential single gets) but I
think it's okay for now and I don't want to make remarkup engine even more
complex until the preprocess/postprocess stuff has had a chance to settle and
I'm more confident it works.
In Differential and Maniphest we'll also incorrectly cache the object
state/name, but that'll fix itself once I move the cache code to use
preprocess/postprocess correctly.
Test Plan:
- See https://secure.phabricator.com/file/view/PHID-FILE-5f9ca32407bec20899b9/
for an example.
- Generated and looked over the documentation.
Reviewed By: jungejason
Reviewers: jungejason, tuomaspelkonen, aran, hunterbridges
CC: skrul, aran, jungejason, epriestley
Differential Revision: 784
190 lines
4.9 KiB
Plaintext
190 lines
4.9 KiB
Plaintext
@title Remarkup Reference
|
|
@group userguide
|
|
|
|
Explains how to make bold text; this makes your words louder so you can win
|
|
arguments.
|
|
|
|
= 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.
|
|
|
|
= Quick Reference =
|
|
|
|
All the syntax is explained in more detail below, but this is a quick guide to
|
|
formatting text in Remarkup:
|
|
|
|
**bold** //italic// ##monospaced##
|
|
= Large Header=
|
|
== Smaller Header ==
|
|
> Quoted Text
|
|
D123 T123 rX123 # Link to Objects
|
|
{D123} {T123} # Link to Objects (Full Name)
|
|
{F123} # Embed Images
|
|
[[wiki page]] # Link to Phriction
|
|
@username # Mention a user
|
|
Indent two spaces for code.
|
|
Indent two spaces with "-" for lists.
|
|
|
|
= 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=text
|
|
- 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=text
|
|
lang=html
|
|
<a href="#">...</a>
|
|
|
|
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
|
|
<a href="#">...</a>
|
|
|
|
You can also use a "COUNTEREXAMPLE" header to show that a block of code is
|
|
bad and shouldn't be copied:
|
|
|
|
lang=text
|
|
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:
|
|
|
|
<http://comma.org/,>
|
|
|
|
This will force the parser to consume the whole URI: <http://comma.org/,>
|
|
|
|
= 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
|
|
|
|
You can also link directly to a comment in Maniphest and Differential:
|
|
|
|
T123#4 # Link to comment #4 of T123
|
|
|
|
You can also generate full-name references to some objects by using braces:
|
|
|
|
{D123} # Link to Differential revision D123 with the full name
|
|
{T123} # Link to Maniphest task T123 with the full name
|
|
|
|
These references will also show when an object changes state (for instance, a
|
|
task is closed or a revision is committed).
|
|
|
|
= Quoting Text =
|
|
|
|
To quote text, preface it with an ">":
|
|
|
|
> This is quoted text.
|
|
|
|
This appears like this:
|
|
|
|
> This is quoted text.
|
|
|
|
= Embedding Images =
|
|
|
|
You can embed an image by using braces to refer to it:
|
|
|
|
{F92} # Embed the image file F92
|
|
|
|
In most interfaces, you can drag-and-drop an image from your computer into the
|
|
text area to upload and reference it.
|
|
|
|
= 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.
|
|
|
|
= Image Macros =
|
|
|
|
You can upload image macros (Files -> Image Macros) which will replace text
|
|
strings with the image you specify. For instance, you could upload an image of a
|
|
dancing banana to create a macro named "peanutbutterjellytime", and then any
|
|
time you type that string it will be replaced with the image of a dancing
|
|
banana.
|
|
|
|
= Mentioning Users =
|
|
|
|
In Differential and Maniphest, you can mention another user by writing:
|
|
|
|
@username
|
|
|
|
When you submit your comment, this will add them as a CC on the revision or task
|
|
if they aren't already CC'd.
|
|
|
|
= Phriction Documents =
|
|
|
|
You can link to Phriction documents with a name or path:
|
|
|
|
Make sure you sign and date your [[legal/Letter of Marque and Reprisal]]!
|
|
|
|
With a pipe (##|##), you can retitle the link. Use this to mislead your
|
|
opponents:
|
|
|
|
Check out these [[legal/boring_documents/ | exciting legal documents]]!
|