parent
e9a1aa0f9f
commit
0a7192ce8b
4 changed files with 15 additions and 1 deletions
|
|
@ -7,6 +7,10 @@ the issue number to the end of the URL: https://github.com/swig/swig/issues/
|
||||||
Version 4.1.0 (in progress)
|
Version 4.1.0 (in progress)
|
||||||
===========================
|
===========================
|
||||||
|
|
||||||
|
2022-01-26: olly
|
||||||
|
#1935 Don't crash on an unclosed HTML tag in a doxygen comment
|
||||||
|
when -doxygen is specified.
|
||||||
|
|
||||||
2022-01-25: olly
|
2022-01-25: olly
|
||||||
Constant expressions now support member access with `.` such as
|
Constant expressions now support member access with `.` such as
|
||||||
`foo.bar`. Previous this only worked in a case like `x->foo.bar`.
|
`foo.bar`. Previous this only worked in a case like `x->foo.bar`.
|
||||||
|
|
|
||||||
6
Examples/test-suite/errors/doxygen_unclosed_tag.i
Normal file
6
Examples/test-suite/errors/doxygen_unclosed_tag.i
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
%module xxx
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return a random variate with uniform distribution in the range [a,b), where a<b
|
||||||
|
*/
|
||||||
|
double uniform(double a, double b);
|
||||||
1
Examples/test-suite/errors/doxygen_unclosed_tag.stderr
Normal file
1
Examples/test-suite/errors/doxygen_unclosed_tag.stderr
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
doxygen_unclosed_tag.i:4: Warning 563: Doxygen HTML error for tag b: HTML tag without '>' found.
|
||||||
|
|
@ -1241,6 +1241,9 @@ void DoxygenParser::processHtmlTags(size_t &pos, const std::string &line) {
|
||||||
// prepend '<' to distinguish HTML tags from doxygen commands
|
// prepend '<' to distinguish HTML tags from doxygen commands
|
||||||
if (!cmd.empty() && addDoxyCommand(m_tokenList, '<' + cmd)) {
|
if (!cmd.empty() && addDoxyCommand(m_tokenList, '<' + cmd)) {
|
||||||
// it is a valid HTML command
|
// it is a valid HTML command
|
||||||
|
if (pos == string::npos) {
|
||||||
|
pos = line.size();
|
||||||
|
}
|
||||||
if (line[pos] != '>') {
|
if (line[pos] != '>') {
|
||||||
// it should be HTML tag with args,
|
// it should be HTML tag with args,
|
||||||
// for example <A ...>, <IMG ...>, ...
|
// for example <A ...>, <IMG ...>, ...
|
||||||
|
|
@ -1266,7 +1269,7 @@ void DoxygenParser::processHtmlTags(size_t &pos, const std::string &line) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pos != string::npos) {
|
if (pos < line.size()) {
|
||||||
pos++; // skip '>'
|
pos++; // skip '>'
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue