Open
Bug 1459527
Opened 7 years ago
Updated 1 year ago
Searchfox doesn't highlight Rust attributes correctly
Categories
(Webtools :: Searchfox, enhancement)
Webtools
Searchfox
Tracking
(Not tracked)
NEW
People
(Reporter: xidorn, Unassigned)
Details
There are two cases which Searchfox currently highlights incorrectly, one is a line starts with attributes, like
> #[macro_use] extern crate syn;
for which Searchfox currently highlight the whole line as attributes, but only the `#[macro_use]` should be.
Another case is that when the attribute has multiple lines, like
> #[derive(Clone, Debug, Eq, MallocSizeOf, PartialEq, SpecifiedValueInfo,
> ToComputedValue, ToCss)]
only the first line gets highlighted as attributes.
I suppose this is because Searchfox handles '#' on the line level, as it should be in C/C++. But it should really be handled on the token level in Rust.
Updated•7 years ago
|
Summary: Searchfox doesn't highlight attributes correctly → Searchfox doesn't highlight Rust attributes correctly
Comment 1•7 years ago
|
||
Looks like searchfox just treats # as line comments in rust.
https://github.com/mozsearch/mozsearch/blob/2467d7042cedf046a7bb8887aabfd64eab64ca4e/tools/src/languages.rs#L212
You need to log in
before you can comment on or make changes to this bug.
Description
•