Add table markup to Phabricator

Summary: See D2902.

Test Plan: Made tables, generated docs.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D2903
This commit is contained in:
epriestley
2012-07-02 14:44:38 -07:00
parent 534c0aa326
commit a33e84e1e5
4 changed files with 103 additions and 26 deletions

View File

@@ -38,6 +38,7 @@ empty lines:
Use "- " or "* " for bulleted lists, and "# " for numbered lists.
Use ``` or indent two spaces for code.
Use %%% for a literal block.
Use <table>...</table> for tables.
= Basic Styling =
@@ -355,3 +356,60 @@ To place text in a literal block use "%%%":
Remarkup will not process the text inside of literal blocks (other than to
escape HTML and preserve line breaks).
= Tables =
Remarkup supports a simplified HTML table syntax. For example, this:
<table>
<tr>
<th>Fruit</th>
<th>Color</th>
<th>Price</th>
<th>Peel?</th>
</tr>
<tr>
<td>Apple</td>
<td>red</td>
<td>`$0.93`</td>
<td>no</td>
</tr>
<tr>
<td>Banana</td>
<td>yellow</td>
<td>`$0.19`</td>
<td>**YES**</td>
</tr>
</table>
...produces this:
<table>
<tr>
<th>Fruit</th>
<th>Color</th>
<th>Price</th>
<th>Peel?</th>
</tr>
<tr>
<td>Apple</td>
<td>red</td>
<td>`$0.93`</td>
<td>no</td>
</tr>
<tr>
<td>Banana</td>
<td>yellow</td>
<td>`$0.19`</td>
<td>**YES**</td>
</tr>
</table>
Some general notes about this syntax:
- your tags must all be properly balanced;
- your tags must NOT include attributes (`<td>` is OK, `<td style="...">` is
not);
- you can use other Remarkup rules (like **bold**, //italics//, etc.) inside
table cells.