Skip to content

Commit a6333ec

Browse files
author
Jacco-V
committed
Add support for marked.md smartypants 'smart' quotes
1 parent 79e738a commit a6333ec

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ export function getAndRemoveConfig(str = '') {
2424
if (str) {
2525
str = str
2626
.replace(
27-
/(?:^|\s):([\w-]+:?)=?([\w-%]+|"((?!").)*")?/g, // Note: because the provided `str` argument has been html-escaped, with backslashes stripped, we cannot support escaped characters in quoted strings :-(
28-
(m, key, value) => {
27+
/(?:^|\s):([\w-]+:?)=?([\w-%]+|"((?!").)*"|[][^]*[])?/g, // Note: because the provided `str` argument has been html-escaped, with backslashes stripped, we cannot support escaped characters in quoted strings :-(
28+
function (m, key, value) {
2929
if (key.indexOf(':') === -1) {
30-
config[key] = (value && value.replace(/"/g, '')) || true;
30+
config[key] = (value && value.replace(/"|[]/g, '')) || true;
3131
return '';
3232
}
3333

0 commit comments

Comments
 (0)