File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
extensions/markdown/CodeBlock Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -165,7 +165,7 @@ export class MarkdownSerializerState {
165165 const startOfLine = this . atBlank ( ) || this . closed ;
166166 this . write ( ) ;
167167 let text = lines [ i ] ;
168- if ( escape !== false ) text = this . esc ( text , startOfLine )
168+ if ( escape !== false && this . options . escape !== false ) text = this . esc ( text , startOfLine )
169169 if ( this . escapeWhitespace ) text = this . escWhitespace ( text ) ;
170170 this . out += text
171171 if ( i != lines . length - 1 ) this . out += '\n' ;
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ export const setCodeBlockType =
2828 if ( ! setBlockType ( nodeType ) ( state ) ) return false ;
2929
3030 if ( dispatch ) {
31- const markup = serializer . serialize ( state . selection . content ( ) . content ) ;
31+ const markup = serializer . serialize ( state . selection . content ( ) . content , { escape : false } ) ;
3232 dispatch (
3333 state . tr . replaceSelectionWith (
3434 nodeType . createAndFill ( { } , markup ? state . schema . text ( markup ) : null ) ! ,
You can’t perform that action at this time.
0 commit comments