The Wiki people, as I found out here start with the text as one long string.
We have the text of a page in one big string which we split into lines to be processed individually. This colors our TextFormattingRules, especially those dealing with bullet lists. Since we've now forced authors to be newline conscious, we give them the opportunity to escape newlines with a back-slash (\) which we substitute with a blank.sub PrintBodyText { s/\\\n/ /g; foreach (split(/\n/, $_)){
(there follows a long long list of regexes) which is kind of an interesting answer to my question, "should I work on an array or a block of text?", which I hadn't considered. It's kind of a "both".
Every bit of code is either naturally related to the problem at hand, or else it's an accidental side effect of the fact that you happened to solve the problem using a digital computer.
M-J D
In reply to Re: Re: AutoMagic HTML
by Cody Pendant
in thread AutoMagic HTML
by Cody Pendant
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |