mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-30 04:23:11 +03:00
Lexical: Fixed code in lists, removed extra old alignment code
Code in lists could throw error on parse due to inner <code> tag being parsed but not actually used within a <pre>, so this updates the importDOM to disregard childdren for code blocks. This also improves the invariant implementation to not be so dev/debugger based, and to include vars in the output.
This commit is contained in:
@ -146,6 +146,12 @@ type NodeName = string;
|
||||
* Output for a DOM conversion.
|
||||
* Node can be set to 'ignore' to ignore the conversion and handling of the DOMNode
|
||||
* including all its children.
|
||||
*
|
||||
* You can specify a function to run for each converted child (forChild) or on all
|
||||
* the child nodes after the conversion is complete (after).
|
||||
* The key difference here is that forChild runs for every deeply nested child node
|
||||
* of the current node, whereas after will run only once after the
|
||||
* transformation of the node and all its children is complete.
|
||||
*/
|
||||
export type DOMConversionOutput = {
|
||||
after?: (childLexicalNodes: Array<LexicalNode>) => Array<LexicalNode>;
|
||||
|
Reference in New Issue
Block a user