Skip to content

Commit

Permalink
Actually remove code blocks from search index
Browse files Browse the repository at this point in the history
Closes #2065
  • Loading branch information
Keats committed Dec 18, 2023
1 parent 8b18ca0 commit 74b06d7
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions components/search/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,10 @@ static AMMONIA: Lazy<ammonia::Builder<'static>> = Lazy::new(|| {
let mut clean_content = HashSet::new();
clean_content.insert("script");
clean_content.insert("style");
let mut rm_tags = HashSet::new();
rm_tags.insert("pre");
clean_content.insert("pre");
let mut builder = ammonia::Builder::new();
builder
.tags(HashSet::new())
.rm_tags(rm_tags)
.tag_attributes(HashMap::new())
.generic_attributes(HashSet::new())
.link_rel(None)
Expand Down Expand Up @@ -89,7 +87,6 @@ fn fill_index(
row.push(body);
};
}

row
}

Expand Down

0 comments on commit 74b06d7

Please sign in to comment.