Skip to content

Commit b200290

Browse files
committed
update source URL extension to handle listing blocks in addition to source blocks
1 parent 17f899d commit b200290

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gulp.d/tasks/build-preview-pages.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@ module.exports = (src, previewSrc, previewDest, sink = () => map()) => (done) =>
111111
.convert()
112112
// NOTE emulates the behavior of the view source url extension
113113
.replace(
114-
/<pre([^>]+)><code([^>]+)>\[data-source-url=(.+?)\]\n/g,
115-
'<pre$1><code$2 data-source-url="$3">'
114+
/<pre([^>]*)(><code[^>]*)?>\[data-source-url=(.+?)\]\n/g,
115+
'<pre$1$2 data-source-url="$3">'
116116
)
117117
)
118118
}

0 commit comments

Comments
 (0)