Skip to content

Commit 44c1c52

Browse files
committed
Prevent code wrapping.
This fixes weird wrapping of embedded Markdown code elements within code blocks. It also prevents inline-code from wrapping, since that also often looks weird.
1 parent bc53ab6 commit 44c1c52

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

data/templates/wg21.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
$endif$
1919
<title>$if(title-prefix)$$title-prefix$ – $endif$$pagetitle$</title>
2020
<style>
21-
code{white-space: pre-wrap;}
21+
code.sourceCode{white-space: pre;}
2222
span.smallcaps{font-variant: small-caps;}
2323
span.underline{text-decoration: underline;}
2424
/* Make the thickness of strikeout and underline consistent in different contexts */

data/templates/wg21.html.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ index dda7e8c..8e8e1f4 100644
1616
<title>$if(title-prefix)$$title-prefix$ – $endif$$pagetitle$</title>
1717
<style>
1818
- $styles.html()$
19-
+ code{white-space: pre-wrap;}
19+
+ code.sourceCode{white-space: pre;}
2020
+ span.smallcaps{font-variant: small-caps;}
2121
+ span.underline{text-decoration: underline;}
2222
+ /* Make the thickness of strikeout and underline consistent in different contexts */

generated/TEST.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<meta name="dcterms.date" content="2026-05-19" />
88
<title>Test document for mpark/wg21</title>
99
<style>
10-
code{white-space: pre-wrap;}
10+
code.sourceCode{white-space: pre;}
1111
span.smallcaps{font-variant: small-caps;}
1212
span.underline{text-decoration: underline;}
1313
/* Make the thickness of strikeout and underline consistent in different contexts */

0 commit comments

Comments
 (0)