Rosetta Code/Fix code tags: Difference between revisions
Undo revision 266616 by Dijkstra Incorrectly marked incorrect. There IS no language named "barf" so those tags were not changed.
(Found incorrectness.) |
Thundergnat (talk | contribs) (Undo revision 266616 by Dijkstra Incorrectly marked incorrect. There IS no language named "barf" so those tags were not changed.) |
||
Line 82:
=={{header|Erlang}}==
Commented away are 3 lines that would create a dict of the existing languages on Rosetta Code. Since the examples have 3 imaginary code tags, I replaced that code this way.
<lang Erlang>
#! /usr/bin/env escript
-module( fix_code_tags ).
-mode( compile ).
Line 121:
loop( eof, Acc ) -> lists:reverse( Acc );
loop( Line, Acc ) -> loop( io:get_line(""), [Line | Acc] ).
{{out}}
<pre>
% cat fix_code_tags
Lorem ipsum <code foo>saepe audire</code> elaboraret ne quo, id equidem
atomorum inciderint usu. <foo>In sit inermis deleniti percipit</foo>,
Line 136 ⟶ 138:
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|F_Sharp|F#}}==
Line 269 ⟶ 272:
=={{header|J}}==
'''Solution:'''
<lang j>require 'printf strings files'
Line 306 ⟶ 308:
=={{header|Java}}==
<lang java>import java.io.BufferedReader;
import java.io.File;
Line 373 ⟶ 374:
}
}
}
▲}</lang>
</lang>
Example:
<pre>
Lorem ipsum <code foo>saepe audire</code> elaboraret ne quo, id equidem
atomorum inciderint usu. <foo>In sit inermis deleniti percipit</foo>,
Line 390 ⟶ 394:
altera electram. Tota adhuc altera te sea, <lang bar>soluta appetere ut mel</bar>.
Quo quis graecis vivendo te, <baz>posse nullam lobortis ex usu</lang>. Eam volumus perpetua
constituto id, mea an omittam fierent vituperatoribus.
</pre>
=={{header|JavaScript}}==
Line 802 ⟶ 808:
=={{header|Ruby}}==
<lang ruby># get all stdin in one string
#text = $stdin.read
Line 823 ⟶ 828:
altera electram. Tota adhuc altera te sea, <code bar>soluta appetere ut mel</bar>.
Quo quis graecis vivendo te, <baz>posse nullam lobortis ex usu</code>. Eam volumus perpetua
constituto id, mea an omittam fierent vituperatoribus. </lang>
<pre>Lorem ipsum <lang foo>saepe audire</lang> elaboraret ne quo, id equidem
|