Skip to content

Commit 128e12a

Browse files
committed
Don't apply .nowrap to pre elements
Align CSS with Antora by using `.doc :not(pre).nowrap` to exclude pre blocks from having `white-space: nowrap` applied. Closes gh-22
1 parent 0edba7d commit 128e12a

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

src/main/css/asciidoctor.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -849,7 +849,7 @@ i.fa.icon-warning {
849849

850850
/* Pass-though Classes */
851851

852-
.doc .nowrap {
852+
.doc :not(pre).nowrap {
853853
white-space: nowrap;
854854
}
855855

src/test/asciidoc/standard.adoc

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,22 @@ Why not have some YAML:
242242
import: "optional:file:./dev.properties"
243243
----
244244

245+
Or some HTTP that also has `nowrap` set:
246+
247+
[source,http,options="nowrap"]
248+
----
249+
HTTP/1.1 200 OK
250+
Content-Type: application/vnd.spring-boot.actuator.v3+json
251+
Content-Length: 121
252+
{
253+
"events" : [ {
254+
"timestamp" : "2021-03-18T16:49:30.625Z",
255+
"principal" : "alice",
256+
"type" : "logout"
257+
} ]
258+
}
259+
----
260+
245261

246262

247263
== Tables

0 commit comments

Comments
 (0)