fix #935
This commit is contained in:
parent
f819227bed
commit
5834790d0b
2 changed files with 32 additions and 6 deletions
|
@ -126,5 +126,30 @@ describe('TinyPostHTMLProcessor', () => {
|
|||
const comparableResult = result.map(mapOnlyText(processorReplace)).join('')
|
||||
expect(comparableResult).to.eql(output)
|
||||
})
|
||||
|
||||
it('Testing handling ignored blocks', () => {
|
||||
const input = `
|
||||
<pre><code>> rei = "0"
|
||||
'0'
|
||||
> rei == 0
|
||||
true
|
||||
> rei == null
|
||||
false</code></pre><blockquote>That, christian-like JS diagram but it’s evangelion instead.</blockquote>
|
||||
`
|
||||
const result = convertHtmlToLines(input)
|
||||
const comparableResult = result.map(mapOnlyText(processorReplace)).join('')
|
||||
expect(comparableResult).to.eql(input)
|
||||
})
|
||||
it('Testing handling ignored blocks 2', () => {
|
||||
const input = `
|
||||
<blockquote>An SSL error has happened.</blockquote><p>Shakespeare</p>
|
||||
`
|
||||
const output = `
|
||||
<blockquote>An SSL error has happened.</blockquote><p>_</p>
|
||||
`
|
||||
const result = convertHtmlToLines(input)
|
||||
const comparableResult = result.map(mapOnlyText(processorReplace)).join('')
|
||||
expect(comparableResult).to.eql(output)
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue