Scripting: Breaking Lines
Posted: 06 Sep 2008 09:01
I was trying
and found two things I did not like.
1. UNIX line breaks (LF) are not recognized by text, so the file is displayed in one long line.
2. the text command took out all <BR> tags from index.htm (and replaced them by CRLF because the line breaker defaults to <BR>)
That first one was easily fixed.
But concerning the <BR> tags: it's probably no good idea to initialize that line breaker to <BR>, and/or to use it by default in the text command. More elegant would have been to add a line breaker as an optional argument! This argument would have to be added to the following commands:
copytext
msg
text
The "br" command could then be dropped.
Agree everybody?
EDIT: Don't bother: I did it.
Code: Select all
::readurl $a, "http://www.xyplorer.com/index.htm"; text $a1. UNIX line breaks (LF) are not recognized by text, so the file is displayed in one long line.
2. the text command took out all <BR> tags from index.htm (and replaced them by CRLF because the line breaker defaults to <BR>)
That first one was easily fixed.
But concerning the <BR> tags: it's probably no good idea to initialize that line breaker to <BR>, and/or to use it by default in the text command. More elegant would have been to add a line breaker as an optional argument! This argument would have to be added to the following commands:
copytext
msg
text
The "br" command could then be dropped.
Agree everybody?
EDIT: Don't bother: I did it.