how do I correctly paste multi-line xml snippet to github wiki when using markdown

岁酱吖の 提交于 2020-04-07 10:58:06

问题


I am trying to create a github wiki for my project. But I am unable to format a snippet from a Spring beans xml file, into this wiki. What is the proper way to do it? I tried using pre tag, code tag, the multiline code tag etc. But either it is not getting displayed at all or It displays everything in the same line.


回答1:


not 100% sure if this is the same thing or not, but I just setup some xml snippets in my readme.md and used the

```xml
<myxml>
   <someElement />  
</myxml>
```

notation.




回答2:


Replace all the less-than < and greater-than > symbols with &lt; and &gt; respectively, then wrap in <pre> and <code> as before.



来源:https://stackoverflow.com/questions/9751548/how-do-i-correctly-paste-multi-line-xml-snippet-to-github-wiki-when-using-markdo

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!