--fix
This commit is contained in:
parent
0cbfcb99a9
commit
fddb531ed2
133 changed files with 507 additions and 448 deletions
|
|
@ -46,7 +46,7 @@ export const convertHtmlToLines = (html = '') => {
|
|||
// All block-level elements that aren't empty elements, i.e. not <hr>
|
||||
const nonEmptyElements = new Set(visualLineElements)
|
||||
// Difference
|
||||
for (let elem of emptyElements) {
|
||||
for (const elem of emptyElements) {
|
||||
nonEmptyElements.delete(elem)
|
||||
}
|
||||
|
||||
|
|
@ -56,7 +56,7 @@ export const convertHtmlToLines = (html = '') => {
|
|||
...emptyElements.values()
|
||||
])
|
||||
|
||||
let buffer = [] // Current output buffer
|
||||
const buffer = [] // Current output buffer
|
||||
const level = [] // How deep we are in tags and which tags were there
|
||||
let textBuffer = '' // Current line content
|
||||
let tagBuffer = null // Current tag buffer, if null = we are not currently reading a tag
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ export const processTextForEmoji = (text, emojis, processor) => {
|
|||
if (char === ':') {
|
||||
const next = text.slice(i + 1)
|
||||
let found = false
|
||||
for (let emoji of emojis) {
|
||||
for (const emoji of emojis) {
|
||||
if (next.slice(0, emoji.shortcode.length + 1) === (emoji.shortcode + ':')) {
|
||||
found = emoji
|
||||
break
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue