I wrote a command line shell script [1] that generates pages on
localhost then posts the result to the w3c validator and prints out
the number of errors. I've been wanting this for a while [2]. I
thought I'd share this in case it is of interest to others and to see
whether anyone can/wants to add it to Jenkins reports. Things like
unclosed DIVS can cause huge problems in causing browser bugs and are
easy to capture with such a tool.
The proof is in the pudding - thanks to this tool I just identified
and applied a fix for this bug [3].
Running the script on MobileFrontend now I currently get the following:
2 validation errors found in main namespace page [see tmp/validate_page.json]
2 validation errors found in special page html markup [see
tmp/validate_special_page.json]
If there are no errors it will not print anything.
.... so as an action item it would be great if these 2 validation
errors could be fixed so that we and others could use such a script in
a pre-commit hook to prevent introducing new errors to our code (both
validation errors reside in core) - the offending errors are these:
* Bad value edit for attribute rel on element link: The string edit is
not a registered keyword or absolute URL. (offending html is <link
rel="edit" title="Edit"
href="/w/index.php?title=W3CValidationTest&action=edit" /> and bug
[4])
* Bad value ResourceLoaderDynamicStyles for attribute name on element
meta: Keyword resourceloaderdynamicstyles is not registered. (see bug
38630 [5] )
Enjoy!
[1] https://gerrit.wikimedia.org/r/61775
[2] https://bugzilla.wikimedia.org/show_bug.cgi?id=31876
[3] https://bugzilla.wikimedia.org/35233
[4] https://bugzilla.wikimedia.org/show_bug.cgi?id=40385
[5] https://bugzilla.wikimedia.org/show_bug.cgi?id=38630
Hi,
how can I figure out in a tag extension callback e.g.
function wfSampleRender( $input, array $args, Parser $parser, PPFrame $frame )
if the parser is inside a block mode or not?
With block mode I mean something like
:<mytag></mytag>
or
#<mytag></mytag>
or
<mytag></mytag>
but not
blindtext <mytag></mytag> more text
If there is an extension that uses ways to dermine the "block" a link
would help a lot.
Best regards
physikerwelt