Rosetta Code/Fix code tags: Difference between revisions

Found incorrectness.
No edit summary
(Found incorrectness.)
Line 82:
 
=={{header|Erlang}}==
{{incorrect|Erlang|<%s> .. <\%s> tag pairs are not converted e.g. "<barf>".}}
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
#! /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] ).</lang>
</lang>
{{out}}
<pre>% cat fix_code_tags
% 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 138 ⟶ 136:
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>
</pre>
 
=={{header|F_Sharp|F#}}==
Line 272 ⟶ 269:
 
=={{header|J}}==
{{incorrect|J|<%s> .. <\%s> tag pairs are not converted e.g. "<barf>".}}
'''Solution:'''
<lang j>require 'printf strings files'
Line 308 ⟶ 306:
 
=={{header|Java}}==
{{incorrect|Java|<%s> .. <\%s> tag pairs are not converted e.g. "<barf>".}}
<lang java>import java.io.BufferedReader;
import java.io.File;
Line 374 ⟶ 373:
}
}
}</lang>
}
</lang>
 
Example:
<pre>user@ubuntu:~$ cat fix.in
<pre>
user@ubuntu:~$ cat fix.in
Lorem ipsum <code foo>saepe audire</code> elaboraret ne quo, id equidem
atomorum inciderint usu. <foo>In sit inermis deleniti percipit</foo>,
Line 394 ⟶ 390:
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>
 
</pre>
 
=={{header|JavaScript}}==
Line 808 ⟶ 802:
 
=={{header|Ruby}}==
{{incorrect|Ruby|<%s> .. <\%s> tag pairs are not converted e.g. "<barf>".}}
<lang ruby># get all stdin in one string
#text = $stdin.read
Line 828 ⟶ 823:
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
Anonymous user