This issue has been created
 
 
XWiki Rendering / cid:jira-generated-image-avatar-d6d970b4-f710-465a-a2f0-ca55be7e0d81 XRENDERING-780 Open

Parse HTML <code> as monospace format block

 
View issue   ·   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-c78ca2aa-4f0d-4b25-a2bb-c06994286a0f Armin Günther created this issue on 26/Mar/25 16:31
 
Summary: Parse HTML <code> as monospace format block
Issue Type: cid:jira-generated-image-avatar-d6d970b4-f710-465a-a2f0-ca55be7e0d81 Improvement
Affects Versions: 16.10.3
Assignee: Unassigned
Components: Syntax - xhtml/1.0 & html/4.01
Created: 26/Mar/25 16:31
Priority: cid:jira-generated-image-static-major-aad9adf1-0a31-4960-a374-a3c180223bf7 Major
Reporter: Armin Günther
Description:

The in-line element <code> is currently ignored when parsing HTML.
It could be converted to a FormatBlock with format MONOSPACE, similar to how it is done for <strong> with BOLD or <em> with ITALIC.

Rendering a MONOSPACE format block in HTML currently results in a
<span class="monospace">...</span>, which does nothing if the class has no CSS style.
Instead it should be rendered as <code>...</code>.

The following should then be identical:

HTML

<code>foobar</code>

XWiki 2.1

##foobar##