(html)
| 66 | // we get here is a single line that starts with `<p>` and ends with `</p>` |
| 67 | // and contains no longer HTML tags. |
| 68 | function fastTextOnly(html) { |
| 69 | if (!html) return '' |
| 70 | if (html.startsWith('<p>') && html.endsWith('</p>')) { |
| 71 | const middle = html.slice(3, -4) |
| 72 | if (!middle.includes('<')) return decode(middle.trim()) |
| 73 | } |
| 74 | return cheerio.load(html, { xmlMode: true }).text().trim() |
| 75 | } |
| 76 | |
| 77 | renderContent.liquid = liquid |
| 78 |