Skip to content

Commit a287c5a

Browse files
donnapepyscik
andauthored
Account for possible whitespace after ending backticks
Co-authored-by: Peter Kiss <peter@yscik.com>
1 parent a538fb8 commit a287c5a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/code-block/transforms.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export default {
2727
const attributes = language ? { language } : {};
2828

2929
// Extract content without backticks and (optionally) language.
30-
attributes.content = startingMatch ? content.replace( startingMatch, '' ).replace( /```$/, '' ) : content;
30+
attributes.content = startingMatch ? content.replace( startingMatch, '' ).replace( /```\s*$/, '' ) : content;
3131

3232
return createBlock( 'syntaxhighlighter/code', attributes );
3333
},

0 commit comments

Comments
 (0)