File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
packages/site-kit/src/lib/markdown Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -57,20 +57,20 @@ export function smart_quotes(
57
57
let char = str . charAt ( index ) ;
58
58
if ( html && char === '&' ) {
59
59
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 ) === '=' ) ;
61
61
open_quote = left ;
62
62
res += `&${ left ? 'l' : 'r' } squo;` ;
63
63
index += 4 ;
64
64
} 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 ) === '=' ) ;
66
66
open_quote = left ;
67
67
res += `&${ left ? 'l' : 'r' } dquo` ;
68
68
index += 5 ;
69
69
} else {
70
70
res += '&' ;
71
71
}
72
72
} 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 ) === '=' ) ;
74
74
open_quote = left ;
75
75
let double = char === '"' ;
76
76
res += double ? ( left ? '“' : '”' ) : left ? '‘' : '’' ;
You can’t perform that action at this time.
0 commit comments