* Compile a node and return a nodeLinkFn based on the * node type. * * @param {Node} node * @param {Object} options * @return {Function|null}
(node, options)
| 7091 | */ |
| 7092 | |
| 7093 | function compileNode(node, options) { |
| 7094 | var type = node.nodeType; |
| 7095 | if (type === 1 && !isScript(node)) { |
| 7096 | return compileElement(node, options); |
| 7097 | } else if (type === 3 && node.data.trim()) { |
| 7098 | return compileTextNode(node, options); |
| 7099 | } else { |
| 7100 | return null; |
| 7101 | } |
| 7102 | } |
| 7103 | |
| 7104 | /** |
| 7105 | * Compile an element and return a nodeLinkFn. |
no test coverage detected