Menu

#6 Comment parsing has an error

open
nobody
dtdparse (5)
5
2009-03-16
2009-03-16
No

The current parse for SGML comments will match from <!-- to -->. That is slightly off. The end delimeter must allow whitespace between the hyphens and the right angle bracket.

So I would change line 1224 of DTD.pm from this:
if ($dtd =~ /^<!--.*?-->/s) {

To this:
if ($dtd =~ /^<!--.*?--\s*>/s) {
---

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.