Remove code blocks from search index

Kinda closes #1176
This commit is contained in:
Vincent Prouillet 2023-01-18 00:26:14 +01:00 committed by Vincent Prouillet
parent 1ae91f3c06
commit 0c5ffa8963
2 changed files with 4 additions and 0 deletions

View file

@ -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

View file

@ -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)