From 37ebda0fad3831e001349dcf502631e11d82992a Mon Sep 17 00:00:00 2001 From: "Kyle E. Mitchell" Date: Sun, 7 Mar 2021 21:47:26 -0800 Subject: [PATCH] Support switching off typographer quotes replacements --- lib/rules_core/smartquotes.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/rules_core/smartquotes.js b/lib/rules_core/smartquotes.js index e96fc71..9e04278 100644 --- a/lib/rules_core/smartquotes.js +++ b/lib/rules_core/smartquotes.js @@ -187,7 +187,11 @@ module.exports = function smartquotes(state) { /*eslint max-depth:0*/ var blkIdx; - if (!state.md.options.typographer) { return; } + var typographerOption = state.md.options.typographer; + if (!typographerOption) { return; } + + var optionIsObject = typeof typographerOption === 'object'; + if (optionIsObject && !typographerOption.quotes) { return; } for (blkIdx = state.tokens.length - 1; blkIdx >= 0; blkIdx--) {