Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XEP-0394: Add support for strong emphasis, declaring langauge on code… #1397

Merged
merged 2 commits into from
Oct 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions xep-0394.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<abstract>This specification provides an alternative to XHTML-IM with rigid separation of content and markup information, improving the resilience against spoofing and injection attacks.</abstract>
&LEGALNOTICE;
<number>0394</number>
<status>Deferred</status>
<status>Experimental</status>
<type>Standards Track</type>
<sig>Standards</sig>
<approver>Council</approver>
Expand All @@ -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