Skip to content

Commit

Permalink
Remove code blocks from search index
Browse files Browse the repository at this point in the history
Kinda closes #1176
  • Loading branch information
Keats committed Feb 16, 2023
1 parent 1ae91f3 commit 0c5ffa8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
for breaking changes with libsass: look for "beginning in Dart Sass"
- Merge settings for the default language set in the root of `config.toml` and in the `[languages.{default_lang}]` section.
This will error if 2 values are set
- Code blocks content are no longer included in the search index


### Other
Expand Down
3 changes: 3 additions & 0 deletions components/search/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@ 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");
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

0 comments on commit 0c5ffa8

Please sign in to comment.