|
|
Этот шаблон содержит незавершённый перевод с английского языка. Вы можете помочь проекту, закончив перевод. |
Этот шаблон используется, чтобы представить разметку или код рядом с результатом его применения.
Каждая ячейка в первой колонке ("Markup") использует <pre>, to retain newlines and spaces but styled to allow content to wrap within it. It is usually desirable to escape the content of these cells so that the markup is displayed by wrapping the markup in <nowiki>. It is technically not possible to add this feature to the template.
Каждая ячейка во второй колонке ("Renders as") скопирована из соответствующей ячейки "разметки" перед ней. Есть случаи, когда это может отличаться:
== покажет странице оглавления; will show in the page table of contents; use {{fake heading}}.{{citation needed}}, use {{fake citation needed}}.|template doc demo=true.<nowiki>Если вы не поместите содержимое ячейки разметки в <nowiki>, then any template markup will not be escaped, it will be expanded.
This example shows the markup for {{tl|tag}}:
| Renders as | Expected rendering |
|---|---|
<span class="wp-templatelink">{{[[Шаблон:tag|tag]]}}</span>
|
{{tl|tag}}
|
HTML entities are parsed in the markup cell:
| Nowikied markup shows as | Expected markup |
|---|---|
– |
–
|
To work around this, replace the & with & thus &nbsp; will show as
If the first line includes wikimarkup that must start on a new line such as #, * or ; then use <nowiki />:
| Разметка | Результат |
|---|---|
# Item 1 # Item 2 # Item 3 # Item 4 |
|
| Разметка | Результат |
|---|---|
<nowiki /> # Item 1 # Item 2 # Item 3 # Item 4 |
|
| Разметка | Результат |
|---|---|
'''Bold text''' |
Bold text
|
''Italic text'' |
Italic text
|
Note that Шаблон:Tl2's second argument here uses Шаблон:Tl2 and Шаблон:Tl2.
| Разметка | Результат |
|---|---|
The quick brown fox jumps over the lazy dog.{{#tag:ref|A footnote.<ref>A reference for the footnote.</ref>|group=nb}} The cow jumped over the moon.{{fact}}
== Notes ==
{{reflist|group=nb}}
== References ==
{{reflist}}
|
The quick brown fox jumps over the lazy dog.[nb 1] The cow jumped over the moon.Шаблон:Fake citation needed
|
| Разметка | Результат |
|---|---|
The quick brown fox jumps over the lazy dog. |
The quick brown fox jumps over the lazy dog.
|
The quick brown fox jumps over the lazy dog. |
The quick brown fox jumps over the lazy dog.
|
The quick brown fox jumps over the lazy dog. |
The quick brown fox jumps over the lazy dog.
|
The quick brown fox jumps over the lazy dog. |
The quick brown fox jumps over the lazy dog.
|
The quick brown fox jumps over the lazy dog. |
The quick brown fox jumps over the lazy dog.
|
| Разметка | Результат |
|---|---|
The quick brown fox jumps over the lazy dog. |
The quick brown fox jumps over the lazy dog.
|
When a template is enclosed within {{code}}, it shows the rendered HTML:
| Разметка | Результат |
|---|---|
{{cite book |last=White |first=T. H. |title=The Book of Merlyn |year=1977}}
|
White, T. H. The Book of Merlyn. — 1977.
|
{{code|{{cite book |last=White |first=T. H. |title=The Book of Merlyn |year=1977}}}}
|
White, T. H. The Book of Merlyn. — 1977. |