File: markdown.tt

package info (click to toggle)
libmojomojo-perl 1.12%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 4,524 kB
  • sloc: perl: 14,730; xml: 120; sh: 97; makefile: 8; ruby: 6
file content (196 lines) | stat: -rw-r--r-- 6,125 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
<h2>[% loc('Markdown help') %]</h2>
<p>
    <ul>
        <li><a href="http://daringfireball.net/projects/markdown/basics" target="_blank">[% loc('Markdown reference - the basics') %]</a>
        <li><a href="http://fletcherpenney.net/multimarkdown/">[% loc('MultiMarkdown reference - the extended syntax') %]</a>
    </ul>
</p>
<table id="syntax">
    <tr>
        <th colspan="2">[% loc('Text Formatting') %]</th>
    </tr>
    <tr>
        <td>[% loc('Text in') %] <em>[% loc('italics') %]</em></td>
        <td>[% loc('*italic* or _italic_') %]</td>
    </tr>
    <tr>
        <td>[% loc('Text in') %] <b>[% loc('bold') %]</b></td>
        <td>[% loc('**bold** or __bold__') %]</td>
    </tr>
    <tr>
        <th colspan="2">[% loc('Links') %]</th>
    </tr>
    <tr>
        <td>[% loc('Link to Another Page') %]</td>
        <td>
            <pre>[[[% loc('Page Name Here') %]]]</pre>
        </td>
    </tr>
    <tr>
        <td rowspan="2">[% loc('Links to Other Sites') %]:</td>
        <td>
            <pre>[[% loc('example') %]]([% loc('http://example.com/') %])</pre>
            [% loc('is formatted as:') %]
            <a href="{% loc('http://example.com') %]">[% loc('example') %]</a>
        </td>
    </tr>
    <tr>
        <td>
            <pre>[[% loc('example') %]]([% loc('http://example.com/') %] "[% loc('Link Title') %]")</pre>
            [% loc('is formatted as:') %]
            <a href="{% loc('http://example.com') %]" title="[% loc('Link Title') %]">[% loc('example') %]</a>
            <br />
            [% loc('hover over the link to see the title') %]
        </td>
    </tr>
    <tr>
        <th colspan="2">[% loc('Headers') %]</th>
    </tr>
    <tr>
        <td>[% loc('Main Header') %]</td>
        <td><pre>[% loc('Main Header') %]<br/>
========</pre>
        </td>
    </tr>
    <tr>
        <td>[% loc('Main Header') %]</td>
        <td><pre># [% loc('Main Header') %]</pre></td>
    </tr>
    <tr>
        <td>[% loc('Sub Header') %]</td>
        <td><pre>[% loc('Sub Header') %]<br />
--------</pre>
    </tr>
    <tr>
        <td>[% loc('Sub Header') %]</td>
        <td><pre>## [% loc('Sub Header') %]<br/>
## [% loc('Sub Header') %] ##</pre>
            [% loc('optionally, you can add the same number of trailing # marks') %]</td>
    </tr>
    <tr>
        <td>[% loc('Sub Sub ... Header') %]
            <br />
            [% loc('up to 6 levels of headers') %]
        </td>
        <td><pre>###### [% loc('Sub Sub ... Header') %]<br/>
###### [% loc('Sub Sub ... Header') %] ######</pre></td>
    </tr>
    <tr>
        <th colspan="2">[% loc('Lists') %]</th>
    </tr>
    <tr>
        <td>[% loc('To get') %]:
            <ul>
                <li>Foo</li>
                <li>Bar</li>
            </ul>
        </td>
        <td>[% loc('Write') %]:
          <pre>* Foo<br />
* Bar
</pre>
            [% loc('NOTE: you need a blank line before and after the list') %]
        </td>
    </tr>
    <tr>
        <td></td>
        <td>
            [% loc('For numbered lists, just use numbers instead of asterisks') %]
            <br />
            <pre>1. Foo<br />
2. Foo
</pre>
        </td>
    </tr>
    <tr>
        <td>
            [% loc('For nested lists, indent each level by 3 spaces') %]
            <ul>
              <li>[% loc('Item 1') %]
                <ul>
                  <li>[% loc('Item 1.1') %]</li>
                  <li>[% loc('Item 1.2') %]</li>
                  <ul>
                    <li>[% loc('Item 1.2.1') %]</li>
                  </ul>
              </li>
              <li>[% loc('Item 2') %]</li>
            </ul>
        </td>
        <td>
            <pre>* [% loc('Item 1') %]<br />
   * [% loc('Item 1.1') %]<br />
   * [% loc('Item 1.2') %]<br />
      * [% loc('Item 1.2.1') %]<br />
* [% loc('Item 2') %]
</pre>
        </td>

    </tr>
    <tr>
        <th colspan="2">[% loc('Block quotes') %]</th>
    </tr>
    <tr>
        <td colspan="2">
            <pre>
&gt; [% loc('Just like email quoting!') %]<br/>
&gt; &gt; [% loc('Blockquotes can be nested') %]<br/>
&gt;  ## [% loc('An h2 tag in a blockquote') %]<br/>
&gt;  <br/>
&gt;  [% loc('And additional Markdown formatting') %]:<br/>
&gt;  * [% loc('An unordered list') %]<br/>
&gt;  * [% loc('Item') %]</pre>
        </td>
    </tr>
    <tr>
        <th colspan="2">[% loc('Horizontal Rules') %] (&lt;hr&gt;)</th>
    </tr>
    <tr>
        <td>[% loc('3 or more dashes or asterisks') %]:<br/>--- [% loc('or') %] *** [% loc('or') %] * * *</td>
        <td>[% loc('Creates') %]: <hr/></td>
    </tr>
    <tr>
        <th colspan="2">[% loc('Code') %]</th>
    </tr>
    <tr>
        <td colspan="2">`&lt;[% loc('code') %]&gt;` [% loc('blocks are wrapped in backticks') %].</td>
    </tr>
    <tr>
        <td>[% loc('Nested backticks') %]:</td>
        <td><code>`` [% loc('just use `2`') %] ``</code> [% loc('in the wrapping block') %]</td>
    </tr>
    <tr>
        <th colspan="2">[% loc('Preformatted Code Blocks') %] (&lt;pre&gt;)</th>
    </tr>
    <tr>
        <td colspan="2">
            [% loc('Simply indent every line of a code block by 4') %]:
            <pre>
[%- loc('Normal paragraph') +%]

    [%+ loc('Spaces on the left
    render text in monospace
    like this example') +%]

[%+ loc('Going back to normal formatting') %]</pre>

[% loc('Note that for programming language code, it may be better to use the Syntax highlight plugin.') %]
        </td>
    </tr>
    <tr>
        <th colspan="2">[% loc('Footnotes') %] (<a href="http://fletcherpenney.net/multimarkdown/users_guide/multimarkdown_syntax_guide/#footnotes">[% loc('details') %]</a>)</th>
    </tr>
    <tr>
        <td colspan="2">[% loc('As detailed in the book&#91;^footnote1&#93;, we will now show that...<br/>
        ...later in the document...<br/>
        &#91;^footnote1&#93;: Conway, Damian - Perl Best Practices, p. 117') %]
        </td>
    </tr>
    <tr>
        <th colspan="2">[% loc('Images') %]</th>
    </tr>
    <tr>
        <td>[% loc('Inline') %]</td>
        <td>![[% loc('alt text') %]](/image/path/file.jpg "[% loc('Optional Title') %]")</td>
    </tr>
</table>