Skip to content

Commit 6fba762

Browse files
committed
Make sure to escape backslash's in .js search files
It was not escaping backslashes, so when a backslash appeared right before the ending " double quote mark, it ruined the syntax for the rest of the javascript file. This should hopefully get the search working again on docs.perl6.org
1 parent e15bbf8 commit 6fba762

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

htmlify.p6

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -762,7 +762,7 @@ sub write-search-file() {
762762
.pairs.sort({.key}).map: -> (:key($name), :value(@docs)) {
763763
qq[[\{ category: "{
764764
( @docs > 1 ?? $kind !! @docs.[0].subkinds[0] ).wordcase
765-
}", value: "$name", url: "{rewrite-url(@docs.[0].url).subst('"', '\"', :g)}" \}]] #"
765+
}", value: "$name", url: " {rewrite-url(@docs.[0].url).subst(\, \\, :g).subst('"', '\"', :g) }" \}]] #"
766766
}
767767
}).flat;
768768

0 commit comments

Comments
 (0)