@@ -101,6 +101,12 @@ const DefaultBlockStyles = {
101101 code : 'CODE'
102102} ;
103103
104+ // Remarkable blocks that stands alone.
105+ const DefaultRemarkableSingletons = [
106+ 'hr' ,
107+ 'fence' ,
108+ ]
109+
104110// Key generator for entityMap items
105111var idCounter = - 1 ;
106112function generateUniqueKey ( ) {
@@ -229,6 +235,7 @@ function markdownToDraft(string, options = {}) {
229235 const BlockTypes = Object . assign ( { } , DefaultBlockTypes , options . blockTypes || { } ) ;
230236 const BlockEntities = Object . assign ( { } , DefaultBlockEntities , options . blockEntities || { } ) ;
231237 const BlockStyles = Object . assign ( { } , DefaultBlockStyles , options . blockStyles || { } ) ;
238+ const RemarkableSingletons = DefaultRemarkableSingletons . concat ( options . remarkableSingletons )
232239
233240 parsedData . forEach ( function ( item ) {
234241 // Because of how remarkable's data is formatted, we need to cache what kind of list we're currently dealing with
@@ -254,7 +261,7 @@ function markdownToDraft(string, options = {}) {
254261
255262 // The entity map is a master object separate from the block so just add any entities created for this block to the master object
256263 Object . assign ( entityMap , blockEntities ) ;
257- } else if ( ( itemType . indexOf ( '_open' ) !== - 1 || itemType === 'fence' || itemType === 'hr' ) && BlockTypes [ itemType ] ) {
264+ } else if ( ( itemType . indexOf ( '_open' ) !== - 1 || RemarkableSingletons . includes [ itemType ] ) && BlockTypes [ itemType ] ) {
258265 var depth = 0 ;
259266 var block ;
260267
0 commit comments