当我放置C++预制文本中的代码
我想使用MediaWiki记录C ++编码项目。我将代码片段丢进了预制的文本块中。问题是,当我包含一行代码时,例如:
if(x == y)
它会打破页面。 我假设解析器认为是标记打开标题,而没有匹配的近距离。
有没有办法标记==,以免将其视为标记。找不到参考。
I want to use MediaWiki to document a C++ coding project. I am dropping code snippets into a preformatted text block. The problem is, when I include a line of code like:
if(x == y)
it breaks the page.
I'm assuming the parser thinks is markup opening heading with no matching close.
Is there a way to mark the == so that it isn't taken as markup. Haven't been able to find a reference.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
激活 syntaxhighlight> syntaxhighlight 在您的
localsettings.php
with wfloadextension('Syntaxhighlight_geshi'); 。确保/path/to/extensions/syntaxhighlight_geshi/pygments/pygmentize
具有执行权限,并使用< syntaxhighlight lang =“ c ++” c ++“ c ++” ;
,或
用
< pre> ...</pre>
包裹片段,或
将摘要的每一行缩进至少一个空间。
Activate SyntaxHighlight in your
LocalSettings.php
withwfLoadExtension( 'SyntaxHighlight_GeSHi' );
. make sure/path/to/extensions/SyntaxHighlight_GeSHi/pygments/pygmentize
has execution permissions and wrap your code snippets with<syntaxhighlight lang="C++">...</syntaxhighlight>
,OR
wrap your snippets with
<pre>...</pre>
,OR
indent every line of your snippets with at least one space.