Rosetta Code/Fix code tags: Difference between revisions

(→‎{{header|Wren}}: Changed to satisfy revised task requirements.)
imported>Katsumi
Line 1,077:
for txt in testtexts:
text2 = sub(r'<lang\s+\"?([\w\d\s]+)\"?\s?>', r'<syntaxhighlight lang=\1>', txt)
text2 = sub(r'<lang\s*>', r'<syntaxhighlight lang=text>', text2)
text2 = sub(r'</lang\s*>', r'</syntaxhighlightsyntax'+'highlight>', text2)
print(txt, '\n=>\n', text2)
 
Anonymous user