Ah. I see what you are getting at. Yes, I think it probably could be used for that purpose.
Mind you, having just taken an extended squint inside Text::Autoformat, i think it would take a very brave person to try and add table inferencing code with all the other things going on in that module.
I'm not adverse to making full use of the regex engine, and the regexes in there are nicely laid out and commented. But, trying to combine the heuristic in the OPs code, with the various heuristics already used in that module, and come away with something that worked, even for some fairly specific cases let alone the general case, would be quite an achievement.
For example, imagine trying to extend the POD example of a quoted email/maillist post that has had it's formatting screwed over by re-quoting. What if the original text contained a table with some left and some right justified fields? Combining the heuristics to extract and reformat that would be quite difficult.
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
| [reply] |
Hey, I didn't say it would be easy :-) I've thought about doing something like this several times over the years but each time, the ratio of code-grok/tuits has always been too high. But I figure if I start planting ideas in other people's heads, perhaps they'll have the appropriate number of tuits to gain some understanding of the code (both Damian's and daseme's) and affect change to Text::Autoformat.
I could just bug Damian about it until he relents, but somehow I don't think that's the right solution ;)
| [reply] |