Rosetta Code/Fix code tags: Difference between revisions

Content added Content deleted
m (→‎{{header|Perl 6}}: Fix mis-capitalized tags too)
No edit summary
Line 482: Line 482:
end
end
</lang>
</lang>
=={{header|Maple}}==
<lang Maple>#Used <#/lang> to desensitize wiki
txt := FileTools[Text][ReadFile]("C:/Users/username/Desktop/text.txt"):
#langs should be a real list of programming languages
langs := ['foo', 'bar', 'baz'];
for lan in langs do
txt := StringTools:-SubstituteAll(txt, cat("<", lan, ">"), cat ("<lang ", lan, ">")):
txt := StringTools:-SubstituteAll(txt, cat("</", lan, ">"), "<#/lang>"):
txt := StringTools:-SubstituteAll(txt, cat("<code ", lan, ">"), cat ("<lang ", lan, ">")):
txt := StringTools:-SubstituteAll(txt, "</code>", "<#/lang>"):
end do;
print(txt);</lang>
{{Out|Output}}
<pre>
"Lorem ipsum <lang foo>saepe audire</lang> elaboraret ne quo, id equidem
atomorum inciderint usu. <lang foo>In sit inermis deleniti percipit</lang>,
ius ex tale civibus omittam. <lang barf>Vix ut doctus cetero invenire</lang>, his eu
altera electram. Tota adhuc altera te sea, <lang bar>soluta appetere ut mel</lang>.
Quo quis graecis vivendo te, <lang baz>posse nullam lobortis ex usu</lang>. Eam volumus perpetua
constituto id, mea an omittam fierent vituperatoribus. "
</pre>


=={{header|Mathematica}}==
=={{header|Mathematica}}==