切换搜索
搜索
切换菜单
notifications
切换个人菜单
查看“模块:Suppress categories/doc”的源代码
来自决策链云智库
更多操作
←
模块:Suppress categories/doc
因为以下原因,您没有权限编辑本页:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
{{module rating|protected}} {{High-use}} This is a simple module to strip [[Help:Category|categories]] from [[Help:Wiki markup|wikitext]]. For example, if passed the code "<code><nowiki>foo[[Category:Some category]]</nowiki></code>", it will return only "<code>foo</code>". The module properly handles categories escaped with the [[Help:Colon trick|colon trick]], categories whose names include invalid characters such as "<code>></code>", and categories that are surrounded with [[WP:NOWIKI|nowiki]] tags. However, it does not support complex wikitext such as nested links or [[WP:MAGIC|magic words]] like <code><nowiki>__TOC__</nowiki></code>. Even so, it should still remove the vast majority of categories from any given wikitext. == Usage == {{pre|<nowiki>{{#invoke:Suppress categories|main|</nowiki>''input text''<nowiki>}}</nowiki>}} == Examples == {| class="wikitable" |- ! Code ! Output |- | <code><nowiki>{{#invoke:Suppress categories|main|foo}}</nowiki></code> | {{#invoke:Suppress categories|main|foo}} |- | <code><nowiki>{{#invoke:Suppress categories|main|foo[[Category:Some category]]}}</nowiki></code> | {{#invoke:Suppress categories|main|foo[[Category:Some category]]}} |- | <code><nowiki>{{#invoke:Suppress categories|main|foo[[Category:Some category]]bar[[Category:Another category]]}}</nowiki></code> | {{#invoke:Suppress categories|main|foo[[Category:Some category]]bar[[Category:Another category]]}} |- | <code><nowiki>{{#invoke:Suppress categories|main|foo{{{some_parameter|[[Category:Bar]]}}}}}</nowiki></code> | {{#invoke:Suppress categories|main|foo{{{some_parameter|[[Category:Bar]]}}}}} |- | <code><nowiki>{{#invoke:Suppress categories|main|foo[[Category:Bad ca[]tegory link]]}}</nowiki></code> | {{#invoke:Suppress categories|main|foo[[Category:Bad ca[]tegory link]]}} |- | <code><nowiki>{{#invoke:Suppress categories|main|foo[[:Category:Colon trick]]}}</nowiki></code> | {{#invoke:Suppress categories|main|foo[[:Category:Colon trick]]}} |- | <code><nowiki>{{#invoke:Suppress categories|main|foo[[Category:Piped link|bar]]}}</nowiki></code> | {{#invoke:Suppress categories|main|foo[[Category:Piped link|bar]]}} |- | <code><nowiki>{{#invoke:Suppress categories|main|foo[[Category:Piped link|ba[]r]]}}</nowiki></code> | {{#invoke:Suppress categories|main|foo[[Category:Piped link|ba[]r]]}} |- | <code><nowiki>{{#invoke:Suppress categories|main|foo[[non-category link]]}}</nowiki></code> | {{#invoke:Suppress categories|main|foo[[non-category link]]}} |- | <code><nowiki>{{#invoke:Suppress categories|main|foo[[ Category : Some category with spaces ]]}}</nowiki></code> | {{#invoke:Suppress categories|main|foo[[ Category : Some category with spaces ]]}} |- |} == See also == * [[Wikipedia:Category suppression]]
本页使用的模板:
模板:High-use
(
查看源代码
)
模板:Module rating
(
查看源代码
)
模板:Pre
(
查看源代码
)
模板:Pre/styles.css
(
查看源代码
)
模块:High-use
(
查看源代码
)
模块:Message box
(
查看源代码
)
模块:Message box/configuration
(
查看源代码
)
模块:Message box/ombox.css
(
查看源代码
)
模块:Suppress categories
(
查看源代码
)
模块:Transclusion count
(
查看源代码
)
模块:Transclusion count/data/S
(
查看源代码
)
模块:Yesno
(
查看源代码
)
返回
模块:Suppress categories/doc
。