Extension talk:RandomSelection

Jump to navigation Jump to search

About this board

Weight in the parser function

2
Wedhro (talkcontribs)

Hello, is it possible to specify a weight for options when using the parser function?

Dinoguy1000 (talkcontribs)
Reply to "Weight in the parser function"

Parser function pipe syntax

2
24.49.246.169 (talkcontribs)

According to the parser function section, there should be a pipe before every choice including the first. However, on my wiki that leads to an empty choice being selected as often as any other result. Compare:

Why {{#choose:not|both}}?

and

Why {{#choose:|not|both}}?

several times to see for yourselves.

24.49.246.169 (talkcontribs)

I also couldn't find a way to specify the uncached parameter with this syntax.

Reply to "Parser function pipe syntax"

Since MediaWiki 1.33 entries starting with whitespace are treated as "code blocks"

2
Dinoguy1000 (talkcontribs)

For some reason after my wiki got updated to 1.33 all texts inside option tags starting with a whitespace are parsed as it happens when you start a new line beginning with a whitespace: a block in monospace font. Before, it just treated it as regular whitespace. I guess it's not intentional.Wedhro (talk) 17:46, 4 July 2019 (UTC)

Though this does not sound nice, no doubt, I think that this should be the expected behaviour. --[[kgh]] (talk) 21:52, 4 July 2019 (UTC)

This is indeed an intentional change, done to make the extension more cache-friendly. See the relevant commit.

(Pings just in case: @Wedhro:, @Kghbln:)

Bawolff (talkcontribs)

Well the commit has been reverted now, but my intention was not to change how the tag worked at all, so any changes to whitespace handling is accidental. Could you post an example of the change?

Reply to "Since MediaWiki 1.33 entries starting with whitespace are treated as "code blocks""
There are no older topics