문제

In a DokuWiki page, I want to show part of an XML file as a highlighted syntax block using the <code xml> tag. The XML also contains a <code></code> tag, so DokuWiki detects it as the end of the block. For example:

<code xml>
  <?xml version="1.0" encoding="UTF-8"?>
  <root>
    <code>Some data</code><!-- The sintax highlighted block breaks here -->
  </root>
</code><!-- This one is actually the closing tag -->

Is there a way to escape the </code> tag?

도움이 되었습니까?

해결책

Use the file tag instead:

<file xml>
  <?xml version="1.0" encoding="UTF-8"?>
  <root>
    <code>Some data</code>
  </root>
</file>
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top