First, a couple of extraneous quotes were left in the second regex around
"</a>".
Second, it is possible that a period or question mark could be used to end
a sentence, rather than be part of the URL. So check that these characters
are followed by an alphanumeric character to make them part of the URL.
Per discussion with Elvish Hunter on the forum. Having dryrun check for a
minimum verbosity level during the options for loop meant that -vd would
set the verbosity level to 1, while -dv would set it to 2.
Those who are updating from old UMC may otherwise be caught unawares by the
change from defaulting to side 1 when the side key is missing, to all
sides. Later we will have an option to turn off this warning.
Since the insertion of an attribute line is now commented out, it may be
questioned whether this still belongs in hack_syntax. However, at some
point the plan is to give users an option to insert the side= key.
Those who are updating from old UMC may otherwise be caught unawares by the
change from defaulting to side 1 when the side key is missing, to all
sides. Later we will have an option to turn off this warning.
After my last change dealing with this issue, I noticed that descriptions
with <pre> had an extra blank line at the top. Adding top-margin to the
CSS file made this go away, but it also made the <br/> superfluous. Thus,
it is simpler just to have every description use <pre> instead of <br/>.
This should finally resolve everything having to do with the add-on
descriptions.
If I'd noticed that the re module hadn't been imported, I probably wouldn't
have considered URL linking to be important enough to do so. Since I've
already written the code, however, I'll keep it.
This is one source of missing-image results.
There remain other reasons for missing icons. The script doesn't find images
in add-ons. And when resources are moved or renamed, they are no longer found
by the script, even if they had been found before.
Also, capitalize a sentence.
After looking into it some more, I think I've figured out how to handle <pre>
in the CSS. So, use that, when description has more than one line.
Also, go to re.sub for turning URLs into links. The version of Python I was
testing my code on wasn't properly handling backreferences in the replacement
string when in the form "\#", causing me to use finditer instead of sub. But
I've discovered that it does handle backreferences in the form "\g<#>". So
switch to much simpler re.sub code.
The description text does not get rendered very well on a webpage. One
solution might be to use pre-wrap/word-wrap in the CSS, but due to
differences between browsers, that's a can of worms (at least for me, I'm
not a web pro).
So, the not-so-elegant solution is to add <br/> to every line.
URLs are also not linked in the plain text. Although in modern browsers
you can select the text and right-click, it's still convenient to turn
them into actual links.
There seems no particular reason to require that this magic comment be at
the very beginning of the line, so why not switch from re.match to
re.search.
Also, update comments to reflect the fact that UtBS no longer uses this
magic comment.
A suggestion has been made to get rid of this magic comment now that UtBS
is no longer using it, but it may still be in use in some UMC somewhere.
To achieve this, add the same leading comment section ("do no edit this
file", etc.) and use the same indentation format as the C++ engine, and
don't use quotes around the uploads attribute value (it's an integer).
Adds a text transform step for the aliasof attribute under
[terrain_type] accounting for several changes to base terrain aliasing
in Wesnoth 1.11.8 and 1.11.9, including:
* 10854d4802 and related commits
* c25849b7ea (Vit -> Vt in 1.11.9)
Just like usual terrain string conversions, this step can be disabled
for a specific line using # wmllint: noconvert.
Keys from the dictionary of stored units are removed as the unit is
unstored or its variable cleared. However, I found that one character in
Legend of Wesmere, Urudin, is stored but apparently never unstored/cleared.
I figure it's best to report such cases.
This message does not include helpful information like the filename,
because that data was never stored in the dictionary. The dictionary was
designed on the presumption that all entries would have a matching unstore/
clear event, and I didn't think of this warning until I saw there was an
anomalous case. Those who get this error will just have to use grep!