Yup, I'm just trying to implement a simple blog (using loathsxome, which is based on blosxom). Posts are based on text files, with or without meta-data (parsed out by one of the existing plugins).
I'm just creating a very simple auto-formatting plugin that will come closest to representing posts in much the same way as I'd format a plain ascii text file. Most of the text needs to wrap and behave like text does, hence an approximation of tabbing (4 non-breaking spaces), and <br/> instead of \n. There is also a quick and dirty syntax for hyperlinks and images. Pretty simple stuff done with a few substitution regexs. The only thing that is giving me trouble is saving ascii art (or 'properly' tabbed stuff) in <pre> from the same treatment.
I suppose either I could break things up element-wise like you suggest, or perhaps write a last set of substitutions that just reinstates \n and \t for all cases enclosed in <pre>... Even though that seems wasteful and stupid, is it worse than invoking a module to do something simple?
Cheers,
JJ
p.s. I don't know the answer to that, as I'm not a real programmer. My hunch is "yes". :) My second hunch is TMTOWTDI
In reply to Re^2: regex in form !regex->regex<-!regex
by forestcreature
in thread regex in form !regex->regex<-!regex
by forestcreature
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |