Skip to content

Instantly share code, notes, and snippets.

@cscott
Last active August 29, 2015 14:24
Show Gist options
  • Save cscott/498e312099f697614807 to your computer and use it in GitHub Desktop.
Save cscott/498e312099f697614807 to your computer and use it in GitHub Desktop.
(01:01:10 PM) James_F: subbu: <ref> in a <ref> is invalid.
(01:01:20 PM) James_F: As is {{#tag:ref}} in a <ref>?
(01:01:35 PM) subbu: James_F, yes, that is what i meant
(01:01:38 PM) James_F: Or something hideously stupid.
(01:01:43 PM) James_F: Yay wikitext. :-(
(01:01:51 PM) subbu: but, yes,you are right ... <ref> in <ref> is invalid.
(01:06:28 PM) neilpquinn [~neilpquin@198.73.209.5] entered the room.
(01:07:07 PM) divec|away is now known as divec
(01:08:18 PM) TrevorParscal is now known as TrevorP|Away
(01:08:37 PM) cscott-free: i should add that to my list of "101 crazy ways to escape wikitext"
(01:09:03 PM) marcoil: only 101?
(01:09:05 PM) cscott-free: <nowiki>, {{!}}, {{#tag:ref}}, &#xx; %zz i'm sure I'm missing some.
(01:09:34 PM) subbu: there are multiple of the {{!}} type templates
(01:09:43 PM) subbu: {{=}} i think to around having to add nowikis
Magic Links should be removed from the parser.
https://phabricator.wikimedia.org/T47942
unclosed list items
https://phabricator.wikimedia.org/T102090#1355610
{{echo|style="red"}} <-- this is a template parameter.
Use {{echo|style{{=}}"red"}} (yuck) to get the literal.
[<nowiki/>[[sic]]] produces a wikilink to "sic" inside of square brackets.
-- CSA really?
https://www.mediawiki.org/wiki/Extension:Arrays#Using_arrayprint
has:
{{#arrayprint:colors||@@@@|<nowiki/>
* length of @@@@: {{#len:@@@@}}
}}
---
from Krinkle:
(01:17:42 PM) Krinkle: I noticed that using || in template values tends to produce <nowiki> instead of {{!}}
(01:18:08 PM) Krinkle: Does parsoid ever produce {{!}}?
(01:20:46 PM) Krinkle: Funny stuff happens when you feed that to {{#tag:}}, e.g. https://www.mediawiki.org/w/index.php?title=Project:Sandbox&oldid=1702766&veaction=edit
(01:21:09 PM) Krinkle: edit the phpi example call, change {{!}} back to II in the inspector and save. it'll become <nowiki>
(01:22:10 PM) cscott-free: Krinkle: that sounds like an example for my "crazy wikitext escapes" file.
(01:22:12 PM) Krinkle: Oh, only in the preview. the saved text uses {{!}}
(01:22:21 PM) Krinkle: interesting
https://phabricator.wikimedia.org/T105198#1438362
---
{{urlencode}}:
https://gerrit.wikimedia.org/r/#/c/181519/
---
https://phabricator.wikimedia.org/T14974#1442616
---
https://phabricator.wikimedia.org/T91154#1092657 escape =
---
(05:45:47 PM) cscott-free: the original WAT talk was like: (1) present code (wikitext) on slide, (2) present evaluation of that code (rendering of that wikitext)
(05:46:15 PM) cscott-free: i think this talk would have to be the reverse: (1) present desired output, (2) present wikitext generating that output.
---
(05:46:07 PM) gwicke: cscott: you should include at least one example that only works because tidy breaks things in different ways that MW does
(05:46:13 PM) gwicke: *than
(05:46:31 PM) cscott-free: gwicke: can you give an example?
(05:46:51 PM) gwicke: empty list items being stripped could be one, but that's relatively lame
(05:46:56 PM) cscott-free: "tidy eliminates empty elements" is the most obvious one i can think of, but it's not really WATish
(05:46:57 PM) arlolra: gwicke: preferable a few examples, formatted as a talk
---
(06:03:06 PM) gwicke: templates would be fun of course
(06:05:10 PM) gwicke: although the best examples might now be lua modules
(06:05:58 PM) gwicke: https://en.wikipedia.org/wiki/Wikipedia:Advanced_template_coding
(06:06:18 PM) cscott-free: i don't yet have any examples of crazy escapes required by lua modules, except maybe {{#arrayprint}} ?
(06:06:39 PM) gwicke: oh, also the self-replicating subst
(06:07:55 PM) gwicke: https://www.mediawiki.org/wiki/User:GWicke/oldUserPage#Fun_with_templates_and_parser_functions
(06:08:31 PM) gwicke: my old favorite still exists: https://en.wikipedia.org/w/index.php?title=Template:Get_regnum()&action=edit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment