Skip to content

Commit b26b34f

Browse files
committed
remove trailing space in codeblock lines
1 parent 18423ad commit b26b34f

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

preview-src/code.adoc

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,21 @@
44

55
The **Copy To Clipboard** button will appear on all code blocks:
66

7+
8+
[source,shell]
9+
----
10+
Copy me!
11+
Do something else
12+
Callout # <1>
13+
Callout # <2>
14+
Comment # Just a regular comment after some code
15+
----
16+
17+
<1> Callout
18+
<2> Callout
19+
20+
21+
722
[source,adoc]
823
----
924
[source,adoc]

src/js/06-code.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ document.addEventListener('DOMContentLoaded', function () {
4646
input = window.neo4jDocs.copyableCommand(input)
4747
}
4848

49+
input = input.replace(/[ ]+\n/g, '\n').trimEnd()
50+
4951
return input
5052
}
5153

0 commit comments

Comments
 (0)