IHP Api Reference
Copyright(c) digitally induced GmbH 2021
Safe HaskellSafe-Inferred

IHP.ServerSideComponent.HtmlDiff

Description

 
Synopsis

Documentation

diffHtml :: Text -> Text -> Either (ParseErrorBundle Text Void) [NodeOperation] Source #

type Path = [Int] Source #

diffNodes :: (?oldHtml :: text, ?newHtml :: Text) => Node -> Node -> [NodeOperation] Source #

diffNodes' :: (?oldHtml :: text, ?newHtml :: Text) => Path -> Node -> Node -> [NodeOperation] Source #

nodeOuterHtml :: Node -> Text -> Text Source #

Grabs the entire HTML string corresponding to the node boundaries.

Node boundaries are only stored for Node. Other nodes (TextNode, etc) don't store start/end offset, so we render them by ourselves.