Skip to content

Commit ec16e4a

Browse files
committed
fix: allow also " inside of an embed
1 parent f80846b commit ec16e4a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Diff for: docs/embed-files.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Then the content of `example.md` will be displayed directly here;
1616

1717
You can check the original content for [example.md](_media/example.md ':ignore').
1818

19-
Normally, this will compiled into a link, but in docsify, if you add `:include` it will be embedded.
19+
Normally, this will compiled into a link, but in docsify, if you add `:include` it will be embedded. You can use single or double quotation marks around as you like.
2020

2121
External links can be used too - just replace the target. If you want to use a gist URL, see [Embed a gist](#embed-a-gist) section.
2222

Diff for: src/core/render/utils.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ export function getAndRemoveConfig(str = '') {
2323

2424
if (str) {
2525
str = str
26-
.replace(/^'/, '')
27-
.replace(/'$/, '')
26+
.replace(/^('|")/, '')
27+
.replace(/('|")$/, '')
2828
.replace(/(?:^|\s):([\w-]+:?)=?([\w-%]+)?/g, (m, key, value) => {
2929
if (key.indexOf(':') === -1) {
3030
config[key] = (value && value.replace(/"/g, '')) || true;

0 commit comments

Comments
 (0)