wesnoth/wesnoth-old — pull request #21 by groggydice (2013-06-05 08:30:15+00:00)
Title: auto-recognize characters in {NAMED_*UNIT} macros (and update 1.4's {LOYAL_UNIT} macro)

The first commit transitions 1.4's {LOYAL_UNIT} to {NAMED_LOYAL_UNIT}, using a regex to carefully distinguish it from the current {LOYAL_UNIT}.

The second auto-recognizes people in {NAMED_*UNIT} macros, saving designers from the hassle of adding "wmllint: recognize" magic comments" or suffering high false positive "unknown 'XXX' referred to by id" messages.

The long delay since I first introduced these ideas has given me plenty of time to test and hone both these regexes. Both thoroughly capture their intended targets, without scooping up false positives.