Skip to content

Commit

Permalink
Correctly display whitespace characters in search error
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Jun 14, 2023
1 parent d1a76a9 commit 4f0a912
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/librustdoc/html/static/js/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -2192,7 +2192,7 @@ function initSearch(rawSearchIndex) {
error.forEach((value, index) => {
value = value.split("<").join("&lt;").split(">").join("&gt;");
if (index % 2 !== 0) {
error[index] = `<code>${value}</code>`;
error[index] = `<code>${value.replaceAll(" ", "&nbsp;")}</code>`;
} else {
error[index] = value;
}
Expand Down

0 comments on commit 4f0a912

Please sign in to comment.