src/components/Widgets/Markdown/serializers/remarkSlate.js
Function convertNode
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function convertNode(node, nodes) {
/**
* Unified/Remark processors use mutable operations, so we don't want to
* change a node's type directly for conversion purposes, as that tends to
Avoid too many return
statements within this function. Open
Open
return createBlock(slateType, nodes);
Avoid too many return
statements within this function. Open
Open
return createText('\n');
Avoid too many return
statements within this function. Open
Open
return createBlock(typeMap[type], { isVoid: true });
Avoid too many return
statements within this function. Open
Open
return createText(convertMarkNode(node));
Avoid too many return
statements within this function. Open
Open
return createBlock(typeMap[type], nodes, { data });
Avoid too many return
statements within this function. Open
Open
return createBlock(slateType, nodes, { data });
Avoid too many return
statements within this function. Open
Open
return createInline(typeMap[type], nodes, { data });
Avoid too many return
statements within this function. Open
Open
return createBlock(typeMap[type], nodes, { data });