Closed
Bug 1259962
Opened 9 years ago
Closed 9 years ago
'delete' and some other C++ keywords are not shown in bold
Categories
(MozReview Graveyard :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: mozbugz, Unassigned)
References
Details
Excerpt from https://reviewboard.mozilla.org/r/42575/diff/1#2 :
> bool mGenerateTimestamps;
> SourceBufferAttributes& operator=(const SourceBufferAttributes& aOther) = default;
> private:
> SourceBufferAttributes() = delete;
'bool', 'const', and ' default' (and other C++ keywords elsewhere) are displayed in bold characters, but 'delete' and 'private' are not.
I'm guessing RB has a list of words to write in bold, it should probably be checked against a complete list of C++ keywords (e.g. http://en.cppreference.com/w/cpp/keyword )
I'm voting for 'final' and 'override' to always be bold as well, as they would rarely be used as identifiers.
Comment 1•9 years ago
|
||
My guess is that this is pygments treating .h files as C instead of C++. Perhaps we can use the work in bug 1255876 to override this, although we'd probably have to do this in all cases. Gerald, do you think it's acceptable to treat all .h files as C++?
Flags: needinfo?(gsquelart)
| Reporter | ||
Comment 2•9 years ago
|
||
Yes I think it would be acceptable:
- Most of the code we review is C++,
- It's only a syntax highlighter in a review tool, so no real danger if things go wrong,
- In the worst case, a pure-C header that uses C++ keywords as identifiers would see them incorrectly bolded.
Flags: needinfo?(gsquelart)
i've configured pygments to feed all .h files into the C++ lexer.
due to caching this is unlikely to update any existing files.
i see 'private' in bold now in .h files, resolving.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•