Consistent function declaration syntax

This commit is contained in:
Jackson Harper 2022-11-21 18:31:47 +08:00 committed by Hongbo Wu
parent dfaba9dbb3
commit 1e4658b771
2 changed files with 10 additions and 3 deletions

View file

@ -0,0 +1,8 @@
//
// File.swift
//
//
// Created by Jackson Harper on 11/21/22.
//
import Foundation

View file

@ -94,9 +94,9 @@ function getTextNodesBetween(rootNode: Node, startNode: Node, endNode: Node) {
}
}
export function findEmbeddedHighlight(
export const findEmbeddedHighlight = (
dom: Element
): EmbeddedHighlightData | undefined {
): EmbeddedHighlightData | undefined => {
const startNode = dom.querySelector(
'span[data-omnivore-highlight-start="true"]'
)
@ -158,7 +158,6 @@ function generateDiffPatch(
afterNodes: ArticleTextContent
): string {
const textWithTags = `${beforeNodes.articleText}<${highlightTag}>${highlightNodes.articleText}</${highlightTag}>${afterNodes.articleText}`
const diffMatchPatch = new DiffMatchPatch()
const patch = diffMatchPatch.patch_toText(
diffMatchPatch.patch_make(allArticleNodes.articleText, textWithTags)