Jump to content

Template:Infobox drug/non-ref-space: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
m Protected "Template:Infobox drug/non-ref-space": High-risk template or module: 3714 transclusions (more info) ([Edit=Require extended confirmed access] (indefinite) [Move=Require extended confirmed access] (indefinite))
secondary bug fix: make opening text escapePattern before Lua Pattern check -- eg -(- bracket
 
Line 2: Line 2:
|={{{s|}}}<!-- ref only; no space -->
|={{{s|}}}<!-- ref only; no space -->
|{{{s|}}}=&#x20;{{{s|}}}<!-- text only; add space -->
|{{{s|}}}=&#x20;{{{s|}}}<!-- text only; add space -->
|#default=<!-- mixed ref-text string; check ref position (initial?) through the initial plain-text character:
|#default=<!-- mixed ref-text string; check ref position (is initial?) through the initial plain-text character:
-->{{#if:{{#invoke:String|match<!--
-->{{#if:{{#invoke:String|match
|s={{{s|}}}
-->|s={{{s|}}}|pattern=^{{str left|1={{trim|1={{KillMarkers|1={{{s|}}}}}}}|2=1}}|plain=false|nomatch=}}<!--
|pattern=^{{#invoke:String|escapePattern|1={{#invoke:String|sub|s={{KillMarkers|1={{{s|}}}}}|i=1|j=1}}}}
|plain=false
|nomatch=
|ignore_errors=true}}<!-- (but err logically not expected)
returned a hit, so initial is text; add space -->|&#x20;{{{s|}}}<!--
returned a hit, so initial is text; add space -->|&#x20;{{{s|}}}<!--
returned blank=nomatch so intial is ref; no space -->|{{{s|}}}<!--
returned blank=nomatch so intial is ref; no space -->|{{{s|}}}<!--
-->}}
-->}}<!-- end of #default test -->
}}|<!-- blank in = blank out -->}}<!--
}}|<!-- blank in = blank out -->}}<!--



Latest revision as of 08:33, 10 March 2023