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(
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 ? '‘' : '’' ;
You can’t perform that action at this time.
0 commit comments