don't use negative lookahead

This commit is contained in:
Sam Denty 2021-02-02 16:50:31 +00:00
parent 410e2e665e
commit 919d5e2cb6
No known key found for this signature in database
GPG key ID: F3E9308D4A43BC0E
3 changed files with 3 additions and 3 deletions

2
Cargo.lock generated
View file

@ -1527,7 +1527,7 @@ checksum = "fa8f3741c7372e75519bd9346068370c9cdaabcc1f9599cbcf2a2719352286b7"
[[package]] [[package]]
name = "site_icons" name = "site_icons"
version = "0.1.2" version = "0.1.3"
dependencies = [ dependencies = [
"byteorder", "byteorder",
"clap", "clap",

View file

@ -1,6 +1,6 @@
[package] [package]
name = "site_icons" name = "site_icons"
version = "0.1.2" version = "0.1.3"
authors = ["Sam Denty <sam@samdenty.com>"] authors = ["Sam Denty <sam@samdenty.com>"]
edition = "2018" edition = "2018"
license = "GPL-3.0" license = "GPL-3.0"

View file

@ -143,7 +143,7 @@ impl Icons {
let mentions_logo = |attr_name| { let mentions_logo = |attr_name| {
elem elem
.attr(attr_name) .attr(attr_name)
.map(|attr| regex!("logo(?!s)").is_match(&attr.to_lowercase())) .map(|attr| regex!("logo([^s]|$)").is_match(&attr.to_lowercase()))
.unwrap_or(false) .unwrap_or(false)
}; };
if mentions_logo("class") || mentions_logo("id") { if mentions_logo("class") || mentions_logo("id") {