Module | Testing 1 | Testing 2 | Testing 3 |
Here's a list of things my test pages have taught me:
- I thought I'd solved all my linking problems, but then I remembered: we only have a tool for counting section links in redirects; it doesn't apply to piped or other section links, which very well may target to nonexistent section undetected. There should be a database report for this, but it'd probably be performance-heavy.
- When I was standardizing the category order for Unicode character point redirects:
- Wikipedia's documentation of category sorting is inadequate, and I will probably have to look at the source code to fully understand it.
- When I was trying to fix a broken section redirect:
- It appears that when a
.##
escape is used in a section link, all special characters must be escaped.I am unsure what constitutes a special character; it may be as broad as characters that aren't ASCII roman letters.Based on some experimentation, I have a strong suspicion that a special character is any character matched by the regex[^\-.0-9:A-Za-z]
. Certain sections require these escapes; for example, if a section has the vertical bar character (|
), it can't be included in a wikilink literally, as it has the function of piping in the wikilink syntax.
- It appears that when a
- When I was investigating the usefulness of HTML comments in communicating information to editors:
- The VisualEditor displays HTML comments.
- HTML comments are not transcluded with templates (for obvious reasons; comments are often used to separate template coding elements to make understanding and altering the template code easier).
- As far as I can tell, pings only work if they're added as part of a new section of contiguous text that ends with a signature. Anything else causes a ping to fail.
- Whatever bug I found here can't be reproduced. It was probably a network or browser issue. I should have saved the HTML and tried the wikitext on another page when I noticed this issue. Or maybe there was an issue, but it was fixed since I noticed it.
Module testing
editSubstitution testing.
- Fails (see this):
{{subst:User:{{ROOTPAGENAME}}/Templates/foo|hello}}
- {{subst:User:Retro/Templates/foo|hello}}
- Works:
{{subst:User:User:Retro/Templates/foo|hello}}
- Hello, world!
- So the take-home is: substitution doesn't work in every case where transclusion will work; magic word variables in particular apparently aren't interpreted earlier, so transclusions of variables will work, while substitution will fail. I should add this example to the Meta help page.
I don't understand how {{subst:#if:{{ns:0}}|yes|no}}
gives the wikitext "yes
". That means the example was well-chosen, but the explanation falters.
Hello, world! {{#invoke:Sandbox/Retro|hello}}
- Ah, so it substitutes the module as represented in the template; it doesn't substitute the module's output itself. I wonder about safesubst:
?
Hello, world! {{#invoke:Sandbox/Retro|hello}}
- In this situation, safesubst:
behaves identically to subst:
. I guess I'm due for some more reading.
Foo (Baz) Qux
editThis is a (successful) test for a Rdcheck bug I recently noted on my talk page.
The bug is explain in more detail here; there's a related notice on Dispenser's talk page here.
!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~
editI don't know whether this section will parse correctly, but I'm about to find out! This might trip the edit filter; I guess I'll find out.
Try <nowiki>'''this'''</nowiki>!
editI don't understand how link parsing works well enough; perhaps this will clarify. While the section above looks like has <nowiki>...</nowiki>
, it doesn't actually have the tags themselves.
The source below is representative of code and its output, but it's not encoded the same as it appears.
- Infinite regression this way.
<
- <
- I initially tried to surround the entire content with
<nowiki>...</nowiki>
(next bullet);{{code}}
is kind of magic; it's probably my favorite template currently.{{code|[[Wikipedia:<nowiki></nowiki>BRD]]}}
[[Wikipedia:BRD]]
- Here's where it can break down. A
</nowiki>
collision.<nowiki>[[Wikipedia:<nowiki></nowiki>BRD]]</nowiki>
- [[Wikipedia:<nowiki>BRD]]</nowiki>
- Appending
<nowiki>
to the beginning won't change anything, no matter how many you add.<nowiki><nowiki>[[Wikipedia:<nowiki></nowiki>BRD]]</nowiki>
- <nowiki>[[Wikipedia:<nowiki>BRD]]</nowiki>
- The prime exhibit: tags (or at least
<nowiki>
ones) interrupt link parsing, so it just displays plainly.[[Wikipedia:<nowiki></nowiki>BRD]]
- [[Wikipedia:BRD]]
- But comments don't interrupt; I assume they're removed from the source earlier in the parsing process.
[[Wikipedia:<!---->BRD]]
- Wikipedia:BRD
My edit summary when I edit this section reads Try <nowiki>'''this'''</nowiki>!
But this makes me think the real bug with anchors is the edit summaries; the parser should be more discerning when it generates an edit summary, just like it's discerning when it generates a section link.
Really, the consistency of edit summaries needs to be improved in general; because I've added an anchor, it now generates the edit summary Try <nowiki>'''this'''</nowiki>!{{anchor|the dreaded anchor}}
, which is not actually a valid link to the section.
- See this page for more information.
Whitespace on edge
editLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Whitespace in the middle
editConsider:
- This link works.
- This link fails.
- And surprisingly, the edit summary link works.
Whitespace everywhere!
editLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Bottom padding
editLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Curabitur pretium tincidunt lacus. Nulla gravida orci a odio. Nullam varius, turpis et commodo pharetra, est eros bibendum elit, nec luctus magna felis sollicitudin mauris. Integer in mauris eu nibh euismod gravida. Duis ac tellus et risus vulputate vehicula. Donec lobortis risus a elit. Etiam tempor. Ut ullamcorper, ligula eu tempor congue, eros est euismod turpis, id tincidunt sapien risus a quam. Maecenas fermentum consequat mi. Donec fermentum. Pellentesque malesuada nulla a mi. Duis sapien sem, aliquet nec, commodo eget, consequat quis, neque. Aliquam faucibus, elit ut dictum aliquet, felis nisl adipiscing sapien, sed malesuada diam lacus eget erat. Cras mollis scelerisque nunc. Nullam arcu. Aliquam consequat. Curabitur augue lorem, dapibus quis, laoreet et, pretium ac, nisi. Aenean magna nisl, mollis quis, molestie eu, feugiat in, orci. In hac habitasse platea dictumst.
Fusce convallis, mauris imperdiet gravida bibendum, nisl turpis suscipit mauris, sed placerat ipsum urna sed risus. In convallis tellus a mauris. Curabitur non elit ut libero tristique sodales. Mauris a lacus. Donec mattis semper leo. In hac habitasse platea dictumst. Vivamus facilisis diam at odio. Mauris dictum, nisi eget consequat elementum, lacus ligula molestie metus, non feugiat orci magna ac sem. Donec turpis. Donec vitae metus. Morbi tristique neque eu mauris. Quisque gravida ipsum non sapien. Proin turpis lacus, scelerisque vitae, elementum at, lobortis ac, quam. Aliquam dictum eleifend risus. In hac habitasse platea dictumst. Etiam sit amet diam. Suspendisse odio. Suspendisse nunc. In semper bibendum libero.
Proin nonummy, lacus eget pulvinar lacinia, pede felis dignissim leo, vitae tristique magna lacus sit amet eros. Nullam ornare. Praesent odio ligula, dapibus sed, tincidunt eget, dictum ac, nibh. Nam quis lacus. Nunc eleifend molestie velit. Morbi lobortis quam eu velit. Donec euismod vestibulum massa. Donec non lectus. Aliquam commodo lacus sit amet nulla. Cras dignissim elit et augue. Nullam non diam. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. In hac habitasse platea dictumst. Aenean vestibulum. Sed lobortis elit quis lectus. Nunc sed lacus at augue bibendum dapibus.
Aliquam vehicula sem ut pede. Cras purus lectus, egestas eu, vehicula at, imperdiet sed, nibh. Morbi consectetuer luctus felis. Donec vitae nisi. Aliquam tincidunt feugiat elit. Duis sed elit ut turpis ullamcorper feugiat. Praesent pretium, mauris sed fermentum hendrerit, nulla lorem iaculis magna, pulvinar scelerisque urna tellus a justo. Suspendisse pulvinar massa in metus. Duis quis quam. Proin justo. Curabitur ac sapien. Nam erat. Praesent ut quam.
Vivamus commodo, augue et laoreet euismod, sem sapien tempor dolor, ac egestas sem ligula quis lacus. Donec vestibulum tortor ac lacus. Sed posuere vestibulum nisl. Curabitur eleifend fermentum justo. Nullam imperdiet. Integer sit amet mauris imperdiet risus sollicitudin rutrum. Ut vitae turpis. Nulla facilisi. Quisque tortor velit, scelerisque et, facilisis vel, tempor sed, urna. Vivamus nulla elit, vestibulum eget, semper et, scelerisque eget, lacus. Pellentesque viverra purus. Quisque elit. Donec ut dolor.
Subst test
editUsing subst on a template that doesn't exist: {{subst:Foo-prod}}