Skip to content

Commit c735af7

Browse files
committed
apply suggestion from review
1 parent c62147a commit c735af7

File tree

1 file changed

+3
-3
lines changed
  • packages/site-kit/src/lib/markdown

1 file changed

+3
-3
lines changed

packages/site-kit/src/lib/markdown/utils.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,20 +57,20 @@ export function smart_quotes(
5757
let char = str.charAt(index);
5858
if (html && char === '&') {
5959
if (str.slice(index, index + 5) === ''') {
60-
let left: boolean = first && !open_quote;
60+
let left: boolean = (first && !open_quote) || (index > 1 && str.charAt(index - 1) === '=');
6161
open_quote = left;
6262
res += `&${left ? 'l' : 'r'}squo;`;
6363
index += 4;
6464
} else if (str.slice(index, index + 6) === '"') {
65-
let left: boolean = first && !open_quote;
65+
let left: boolean = (first && !open_quote) || (index > 1 && str.charAt(index - 1) === '=');
6666
open_quote = left;
6767
res += `&${left ? 'l' : 'r'}dquo`;
6868
index += 5;
6969
} else {
7070
res += '&';
7171
}
7272
} else if (!html && (char === '"' || char === "'")) {
73-
let left: boolean = first && !open_quote;
73+
let left: boolean = (first && !open_quote) || (index > 1 && str.charAt(index - 1) === '=');
7474
open_quote = left;
7575
let double = char === '"';
7676
res += double ? (left ? '“' : '”') : left ? '‘' : '’';

0 commit comments

Comments
 (0)