diff options
author | albert-github <albert.tests@gmail.com> | 2020-06-13 12:55:13 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-13 12:55:13 (GMT) |
commit | e53fa89addc9659ad406298d27a6376d1eb53e0d (patch) | |
tree | eaa7ea5f3aa70a61a2ec3343cd6dacf7dd601aa2 /src/util.cpp | |
parent | e7637f9dd977e9821394e7bed4dec02aec41ab9e (diff) | |
download | Doxygen-e53fa89addc9659ad406298d27a6376d1eb53e0d.zip Doxygen-e53fa89addc9659ad406298d27a6376d1eb53e0d.tar.gz Doxygen-e53fa89addc9659ad406298d27a6376d1eb53e0d.tar.bz2 |
Incorrect label in map of dot files in xhtml (#7840)
When a filename of a file starts with a digit the mapping of the resulting dot files results in message like:
```
Syntax of value for attribute id of map is not valid
```
an id cannot start with a digit, so an "a" is placed in front of it (unconditionally to overcome problems with a double label id i.e filename 087.cpp and a087.cpp).
Diffstat (limited to 'src/util.cpp')
-rw-r--r-- | src/util.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/util.cpp b/src/util.cpp index 1624b1c..a298ace 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -5278,6 +5278,16 @@ QCString convertToId(const char *s) return growBuf.get(); } +/*! Some strings have been corrected but the requirement regarding the fact + * that an id cannot have a digit at the first position. To overcome problems + * with double labels we always place an "a" in front + */ +QCString correctId(QCString s) +{ + if (s.isEmpty()) return s; + return "a" + s; +} + /*! Converts a string to an XML-encoded string */ QCString convertToXML(const char *s, bool keepEntities) { |