Revise a Perl-based tool for converting wiki-like code into HTML. We have a working, proven perl module, but it contains a few bugs. The code is dense, and uses many regex patterns.
The code is about 350 lines, including comments. The key lines of code you will work on are in the attached file. The code converts wiki syntax, e.g., blank lines, into HTML, like "br" and "p" tags.
We have a few problems with (a) duplicated or omitted "p" tags that result from some lookahead and greedy matches. (b) adding tags which allow block of code to be ignored. (c) escaping entities within "pre" tags, but not otherwise.
We will provide our Perl module, and some sample inputs, and explain the bugs in much more detail.