Skip to content

Commit 7381b46

Browse files
authored
fix(theme): disable text-autospace in <code>, <kbd>, and <samp> (#3254)
1 parent 4d854ba commit 7381b46

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

.changeset/beige-parrots-slide.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@rspress/core': patch
3+
---
4+
5+
fix(theme): disable `text-autospace` in `<code>`, `<kbd>`, and `<samp>`

packages/core/src/theme/styles/base.css

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,10 @@ body {
6666
text-autospace: normal;
6767
}
6868

69-
pre {
69+
pre,
70+
code,
71+
kbd,
72+
samp {
7073
text-autospace: no-autospace;
7174
}
7275

scripts/dictionary.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ atoyan
1010
atrules
1111
autohide
1212
autoreleasepool
13+
autospace
1314
bilibili
1415
biomejs
1516
Bluch

0 commit comments

Comments
 (0)