MCPcopy
hub / github.com/basecamp/trix / shouldAddExtraNewlineElement

Method shouldAddExtraNewlineElement

src/trix/views/block_view.js:71–73  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

69 // A single <br> at the end of a block element has no visual representation
70 // so add an extra one.
71 shouldAddExtraNewlineElement() {
72 return /\n\n$/.test(this.block.toString())
73 }
74}

Callers 1

createNodesMethod · 0.95

Calls 2

testMethod · 0.80
toStringMethod · 0.45

Tested by

no test coverage detected