27 lines
605 B
Text
27 lines
605 B
Text
if (BB < 0) { // block not set
|
|
BB(0) // convert entire file
|
|
BE(File_Size)
|
|
}
|
|
|
|
// Convert special characters into entities
|
|
Replace_Block("&","&", BB, BE, BEGIN+ALL+NOERR)
|
|
Replace_Block("<","<", BB, BE, BEGIN+ALL+NOERR)
|
|
Replace_Block(">",">", BB, BE, BEGIN+ALL+NOERR)
|
|
|
|
// Convert CSV into HTML table
|
|
Goto_Pos(BB)
|
|
IT('<table>') IN
|
|
#80 = Cur_Pos
|
|
Goto_Pos(BE)
|
|
IT("</table>")
|
|
#81 = Cur_Line
|
|
IN
|
|
Goto_Pos(#80)
|
|
while (Cur_Line < #81) {
|
|
IT(" <tr><td>")
|
|
Replace_Block(",","</td><td>",Cur_Pos,EOL_Pos,ALL+NOERR)
|
|
EOL
|
|
IT("</td></tr>")
|
|
Line(1)
|
|
}
|
|
BB(Clear)
|