-
-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added node (card) support to lexical URL transforms
refs TryGhost/Product#2225 - each Lexical node (representing a Ghost card) can have multiple data properties that need URLs transforming in different ways (plain url, html, markdown) - Ghost will pass `nodes` and `transformMap` options through to the lexical transform utilities - `nodes` is an array of node classes - `transformMap` is two-level object, with top-level keys representing the three transform types we support (`toTransformReady`, `absoluteToRelative`, `relativeToAbsolute`), and the second level keys representing the data type (`url`, `html`, `markdown`) with the value for each being a function that takes a url argument and transforms it as necessary - when transforming lexical content, we match any serialized node to one of the loaded nodes and use that node's `urlTransformMap` property to call the right transform method for each data property
- Loading branch information
1 parent
919dd8e
commit 2cce002
Showing
9 changed files
with
546 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.