How escape pipe charachter in MediaWiki parser function?

99封情书 提交于 2021-02-11 06:10:45

问题


How do I escape a pipe character using a MediaWiki parser function?

Replacing a backslash by a hyphen can be like this:

{{#vardefine:varName|test\test\test}}
{{#vardefine:varName2|{{#replace:{{#var:varName}}|\|-}}}}
{{#var:varName2}}

But replacing a pipe character ...?


回答1:


Use the built-in magic word {{!}} instead of litteral pipes.



来源:https://stackoverflow.com/questions/62773762/how-escape-pipe-charachter-in-mediawiki-parser-function

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