-
Notifications
You must be signed in to change notification settings - Fork 12
Closed
Labels
Description
As reported in a support topic:
This issue is now happening with XML Unexpected line number appearing on same line #193
I had a page with XML in a code block. I updated to 1.3. Then looked at this page. It now has the “unexpected line number” problem in the code block with XML in it. It didn’t have this problem in the previous version (1.2.3). To doublecheck, I reinstalled the previous version and verified that the problem wasn’t there.
I have this XML on the page:
<?xml version="1.0" encoding="utf-8" ?> <nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.nlog-project.org/schemas/NLog.xsd NLog.xsd" autoReload="true"> </nlog>Due to #245, you have to manually type in the XML. Here is the simplest way to repro this:
- Create a new page
- Add a code block
- Manually type in this XML:
<?xml version="1.0" encoding="utf-8" ?> <tag a="t" b="t"> </tag>
- Use the following settings:
- Language = HTML, XML
- Show Line Numbers = true
- Wrap Lines = true
Here's some sample post_content:
<!-- wp:code {"language":"xml","showLineNumbers":true,"wrapLines":true} -->
<pre class="wp-block-code"><code><?xml version="1.0" encoding="utf-8" ?>
<tag a="t"
b="t">
</tag></code></pre>
<!-- /wp:code -->
<!-- wp:code {"showLineNumbers":true,"wrapLines":true} -->
<pre class="wp-block-code"><code><?xml version="1.0" encoding="utf-8" ?>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.nlog-project.org/schemas/NLog.xsd NLog.xsd"
autoReload="true">
</nlog></code></pre>
<!-- /wp:code -->I can reproduce the issue:
