File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
src/jupyter_contrib_nbextensions/nbextensions/python-markdown Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ define([
63
63
html = marked ( text ) ;
64
64
} else if ( out_data . msg_type === "stream" ) {
65
65
html = marked ( out_data . content . text ) ;
66
- var t = html . match ( / ^ < p > ( [ \s \S ] * ?) < \/ p > $ / ) ; //strip <p> and </p> that marked (maybe) adds and we don't want
66
+ var t = html . match ( / ^ \s * < p > ( [ \s \S ] * ?) < \/ p > \s * $ / ) ; //strip <p> and </p> that marked (maybe) adds and we don't want
67
67
html = t !== null ? t [ 1 ] : html ;
68
68
var q = html . match ( / ^ & # 3 9 ; ( [ \s \S ] * ?) & # 3 9 ; $ / ) ; // strip quotes from strings
69
69
if ( q !== null ) html = q [ 1 ]
@@ -90,7 +90,7 @@ define([
90
90
} else {
91
91
html = marked ( ul [ 'text/plain' ] ) ;
92
92
// [\s\S] is used to also catch newlines
93
- var t = html . match ( / ^ < p > ( [ \s \S ] * ?) < \/ p > $ / ) ; //strip <p> and </p> that marked adds and we don't want
93
+ var t = html . match ( / ^ \s * < p > ( [ \s \S ] * ?) < \/ p > \s * $ / ) ; //strip <p> and </p> that marked adds and we don't want
94
94
html = t !== null ? t [ 1 ] : html ;
95
95
var q = html . match ( / ^ & # 3 9 ; ( [ \s \S ] * ?) & # 3 9 ; $ / ) ; // strip quotes from strings
96
96
if ( q !== null ) html = q [ 1 ]
You can’t perform that action at this time.
0 commit comments