mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Consistent function declaration syntax
This commit is contained in:
parent
dfaba9dbb3
commit
1e4658b771
2 changed files with 10 additions and 3 deletions
|
|
@ -0,0 +1,8 @@
|
|||
//
|
||||
// File.swift
|
||||
//
|
||||
//
|
||||
// Created by Jackson Harper on 11/21/22.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue