Provide a "reference-with-full-name" syntax for Remarkup

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
This commit is contained in:
epriestley
2011-08-05 08:50:26 -07:00
parent 233511419c
commit fa49c6c52d
10 changed files with 247 additions and 0 deletions

View File

@@ -11,6 +11,23 @@ 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:
@@ -103,6 +120,14 @@ 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 ">":
@@ -113,6 +138,15 @@ 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: