Skip to content

Commit

Permalink
fix: allow also " inside of an embed
Browse files Browse the repository at this point in the history
  • Loading branch information
luwol03 committed Jun 22, 2021
1 parent f80846b commit ec16e4a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/embed-files.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Then the content of `example.md` will be displayed directly here;

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

Normally, this will compiled into a link, but in docsify, if you add `:include` it will be embedded.
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.

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.

Expand Down
4 changes: 2 additions & 2 deletions src/core/render/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ export function getAndRemoveConfig(str = '') {

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

0 comments on commit ec16e4a

Please sign in to comment.