the editable site (validation-lab)
This commit is contained in:
commit
3ac81d5a52
13454 files changed
+2227005
No files matched your search
+26
@@ -0,0 +1,26 @@
|
||||
import { detachNodeFromParent } from '../lib/xast.js';
|
||||
|
||||
export const name = 'removeTitle';
|
||||
export const description = 'removes <title>';
|
||||
|
||||
/**
|
||||
* Remove <title>.
|
||||
*
|
||||
* https://developer.mozilla.org/en-US/docs/Web/SVG/Element/title
|
||||
*
|
||||
* @author Igor Kalashnikov
|
||||
*
|
||||
* @type {import('../lib/types.js').Plugin}
|
||||
* @since 0.4.4
|
||||
*/
|
||||
export const fn = () => {
|
||||
return {
|
||||
element: {
|
||||
enter: (node, parentNode) => {
|
||||
if (node.name === 'title') {
|
||||
detachNodeFromParent(node, parentNode);
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
};
|
||||
Reference in new issue
Block a user