Skip to content

Commit

Permalink
XEP-0394: Add support for strong emphasis, declaring langauge on code…
Browse files Browse the repository at this point in the history
… blocks and making lists ordered.
  • Loading branch information
mar-v-in committed Aug 21, 2024
1 parent 728dedf commit 28e8214
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions xep-0394.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@
<email>[email protected]</email>
<jid>[email protected]</jid>
</author>
&larma;
<revision>
<version>0.3.0</version>
<date>2024-07-13</date>
<initials>lmw</initials>
<remark>Add support for strong emphasis, declaring langauge on code blocks and making lists ordered.</remark>
</revision>
<revision>
<version>0.2.1</version>
<date>2019-01-05</date>
Expand Down Expand Up @@ -91,7 +98,8 @@
]]></example>
<p>The following child elements are defined for &lt;span/&gt;:</p>
<ul>
<li>&lt;emphasis/&gt;: The spanned range is emphasized. Suggested rendering: italics or bold.</li>
<li>&lt;emphasis/&gt;: The spanned range is emphasized. Suggested rendering: italics.</li>
<li>&lt;strong/&gt;: The spanned range is strongly emphasized. Suggested rendering: bold.</li>
<li>&lt;code/&gt;: The spanned range is some kind of machine code. Suggested rendering: monospaced.</li>
<li>&lt;deleted/&gt;: The spanned range has been deleted. Suggested rendering: striked through.</li>
</ul>
Expand All @@ -107,11 +115,12 @@
<body>Just run this command:
$ cowsay XMPP is awesome.</body>
<markup xmlns="urn:xmpp:markup:0">
<bcode start="23" end="48"/>
<bcode start="23" end="48" language="bash"/>
</markup>
</message>
]]></example>
<p>The start and end attributes work just like for &lt;span/&gt;.</p>
<p>The optional language attribute allows to specify the programming or markup language used in the code block. TODO: What are valid language names?</p>
<p>The suggested rendering of code blocks is as block-level elements with monospaced font. The above example could render in HTML as:</p>
<div class="example">
<p>Just run this command:</p>
Expand All @@ -128,7 +137,7 @@ $ cowsay XMPP is awesome.</body>
* lists
* and possibly more!</body>
<markup xmlns="urn:xmpp:markup:0">
<list start="31" end="89">
<list start="31" end="89" ordered="false">
<li start="31"/>
<li start="47"/>
<li start="61"/>
Expand All @@ -138,6 +147,7 @@ $ cowsay XMPP is awesome.</body>
</message>
]]></example>
<p>The start and end attributes of &lt;list/&gt; define the scope of the list. The start of the &lt;li/&gt; elements denote the start of a new list item. A list item continues until the end of the list or the start of the next list item. The first &lt;li/&gt; in a &lt;list/&gt; MUST have a start value equal to the start value of the &lt;list/&gt;.</p>
<p>The optional ordered attribute may be set to true to indicate the list is ordered and displaying it with numerical or alphabetical ordering instead of bullets is suggested.</p>
<p>The above example could render in HTML as:</p>
<div class="example">
<p>This XEP supports many things:</p>
Expand Down

0 comments on commit 28e8214

Please sign in to comment.