applyBlock method
Applies the tag and anchor in its own line just before the node.
Apply to block collections only.
Implementation
String applyBlock(String? tag, String? anchor, int nodeIndent, String node) {
// Inline the properties and check if any are present.
// PS: This "if-case" is intentional. Expressive :)
if (applyInline(tag, anchor, '').trim() case final properties
when properties.isNotEmpty) {
return '$properties\n${' ' * nodeIndent}${node.trimLeft()}';
}
return node;
}