Rosetta Code/Fix code tags: Difference between revisions
Content added Content deleted
(→{{header|Wren}}: Changed to satisfy revised task requirements.) |
imported>Katsumi (→Python) |
||
Line 1,077: | Line 1,077: | ||
for txt in testtexts: |
for txt in testtexts: |
||
text2 = sub(r'<lang\s+\"?([\w\d\s]+)\"?\s?>', r'<syntaxhighlight lang=\1>', txt) |
text2 = sub(r'<lang\s+\"?([\w\d\s]+)\"?\s?>', r'<syntaxhighlight lang=\1>', txt) |
||
text2 = sub(r'<lang\s*>', |
text2 = sub(r'<lang\s*>', '<syntaxhighlight lang=text>', text2) |
||
text2 = sub(r'</lang\s*>', |
text2 = sub(r'</lang\s*>', '</syntax'+'highlight>', text2) |
||
print(txt, '\n=>\n', text2) |
print(txt, '\n=>\n', text2) |
||