Page MenuHomePhabricator

Create a <codenowiki>/<nowikicode> tag
Closed, DeclinedPublic

Description

Right now, to create display a code sample which has Mediawiki syntax, we need to wrap it in two tags\

<code><nowiki>Foobar</nowiki></code>

I propose we add a single tag to simplify this

<codenowiki>Foobar</codenowiki>

Possibly with

<nowikicode>Foobar</nowikicode>

as an alias

Event Timeline

Headbomb created this task.May 20 2018, 6:04 PM
Restricted Application added subscribers: jeblad, Aklapper. · View Herald TranscriptMay 20 2018, 6:04 PM
Nirmos added a subscriber: Nirmos.May 20 2018, 7:21 PM

Wouldn't it be easier to create a template with the content

<code>{{#tag:nowiki|{{{1}}}}}</code>

?

That way, the call is shorter. Compare

{{codenowiki|Foobar}}

to your proposed

<codenowiki>Foobar</codenowiki>

Nope, doesn't work. If you have something like that, whatever you put in {{{1}}} will still be treated as wikicode to be rendered, before it gets passed to the template. It particular, if you want to say, codenowiki something like "(\d|-)", then the {{{1}}} parameter is '(\d'.

Pppery added a subscriber: Pppery.

Unnecessary feature bloat

Aklapper closed this task as Declined.Jun 18 2018, 11:04 AM

No thanks.

Vvjjkkii renamed this task from Create a <codenowiki>/<nowikicode> tag to hkcaaaaaaa.Jul 1 2018, 1:08 AM
Vvjjkkii reopened this task as Open.
Vvjjkkii triaged this task as High priority.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed a subscriber: Aklapper.
Pppery renamed this task from hkcaaaaaaa to Create a <codenowiki>/<nowikicode> tag.Jul 1 2018, 12:42 PM
Pppery updated the task description. (Show Details)
Pppery closed this task as Declined.Jul 1 2018, 12:45 PM
Pppery raised the priority of this task from High to Needs Triage.