Template talk:Wikidata alignment

Problem
A lot of articles are in Category:Pages with script errors with a hidden error, for example Algoma Light and Boston Light. The error is "Lua error: Unmatched close-bracket at pattern character 27." I think the problem concerns recent edits here resulting in

That boils down to

I think the  is not doing anything useful. The problem is that  is required for the articles with an error which have regex characters such as   in the text. Actually, is  needed? Can't the strings be compared with ? Johnuniq (talk) 06:59, 4 November 2021 (UTC)
 * Thanks for note. I will look into this shortly. &mdash; Martin (MSGJ · talk) 07:55, 4 November 2021 (UTC)
 * Yes, it's because the parameter has a wikilink, so I need to strip this somehow. Setting true might be a quick fix. I will continue looking. &mdash; Martin (MSGJ · talk) 10:36, 4 November 2021 (UTC)
 * I have used the delink template to strip out the square brackets. This seems to have fixed the errors. &mdash; Martin (MSGJ · talk) 15:12, 4 November 2021 (UTC)
 * I'm not sure that a regex match would ever work reliably and I don't understand why it is needed. Anyway, these articles have problems which I imagine can be solved by cleaning the characteristic parameters:
 * Old Orchard Shoal Light • characteristic = Fl W 6s (Red from 087 deg to 203 deg
 * Vaindloo Lighthouse • characteristic = Fl W/R 15 s. (1+14=15 s.) Vaindloo red.gifVaindloo white.gif
 * Vilsandi Lighthouse • characteristic = Fl(3) W/R 15 s. Vilsandi lighthouse red.gifVislandi lighthouse white.gif
 * Johnuniq (talk) 09:03, 5 November 2021 (UTC)