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 {
165
165
const startOfLine = this . atBlank ( ) || this . closed ;
166
166
this . write ( ) ;
167
167
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 )
169
169
if ( this . escapeWhitespace ) text = this . escWhitespace ( text ) ;
170
170
this . out += text
171
171
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 =
28
28
if ( ! setBlockType ( nodeType ) ( state ) ) return false ;
29
29
30
30
if ( dispatch ) {
31
- const markup = serializer . serialize ( state . selection . content ( ) . content ) ;
31
+ const markup = serializer . serialize ( state . selection . content ( ) . content , { escape : false } ) ;
32
32
dispatch (
33
33
state . tr . replaceSelectionWith (
34
34
nodeType . createAndFill ( { } , markup ? state . schema . text ( markup ) : null ) ! ,
You can’t perform that action at this time.
0 commit comments