@lyra/block-content-tests
Version:
Tests for shared block content rendering logic
63 lines (62 loc) • 1.19 kB
JavaScript
module.exports = {
input: {
_key: 'R5FvMrjo',
_type: 'block',
children: [
{
_key: 'a',
_type: 'span',
marks: ['code'],
text: 'code'
},
{
_key: 'b',
_type: 'span',
marks: ['strong'],
text: 'strong'
},
{
_key: 'c',
_type: 'span',
marks: ['em'],
text: 'em'
},
{
_key: 'd',
_type: 'span',
marks: ['underline'],
text: 'underline'
},
{
_key: 'e',
_type: 'span',
marks: ['strike-through'],
text: 'strike-through'
},
{
_key: 'f',
_type: 'span',
marks: ['dat-link'],
text: 'link'
}
],
markDefs: [
{
_key: 'dat-link',
_type: 'link',
href: 'https://www.vegapublish.com/'
}
],
style: 'normal'
},
output: [
'<p>',
'<code>code</code>',
'<strong>strong</strong>',
'<em>em</em>',
'<span style="text-decoration:underline;">underline</span>',
'<del>strike-through</del>',
'<a href="https://www.vegapublish.com/">link</a>',
'</p>'
].join('')
}