Hello. I've been hacking on Erik Oliver's rather nice setext-to-html script, refining it beyond the original interpretations of setext back in 2002. I've run into two major snags that my limited knowledge of Perl is not allowing me to get past. I'd appreciate any pointers or assistance anyone can offer.
I've included the complete script, and the example setext file I test it with. The problems: 1. The setext twodot-typotag ('..' on a line by itself), is intended to indicate the logical end of textual information in a file. So, the script should stop parsing the file when it encounters that tag. [Side note: two periods beginning a line are used for other reasons, too, so _only_ two periods alone on a line indicate the end of text]. However, in loop2 within the script, I've tried adding a simple: if (/^\.\.\s*$/) {last;} and it won't work. 2. I'm trying to implement the note-typotag. This one is a two-part construction, consisting of a hot tagged word in the text (word followed by underscore: hot_ ) and a note tag to define the content: .. _hot Note content here. I've hacked the href parsing piece to collect the notes ok. (Hrefs substitute a URL for the note content and are otherwise identical.) I can't seem to find any variation on the hot-word parser that allows me to tag both hrefs and notes. I'm really frustrated right now, so if I've left out necessary details, I apologise. Let me know and I'll clarify. Thanks for any help, Matthew -- mcm __________________________________ Do you Yahoo!? Win a $20,000 Career Makeover at Yahoo! HotJobs http://hotjobs.sweepstakes.yahoo.com/careermakeover
setext2html.pl
Description: setext2html.pl
test.etx
Description: test.etx
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>