doSerialization method
String
doSerialization(
- Document document,
- HorizontalRuleNode node, {
- NodeSelection? selection,
override
Implementation
@override
String doSerialization(
Document document,
HorizontalRuleNode node, {
NodeSelection? selection,
}) {
if (selection != null) {
if (selection is! UpstreamDownstreamNodeSelection) {
// We don't know how to handle this selection type.
return '';
}
if (selection.isCollapsed) {
// This selection doesn't include the horizontal rule - it's a collapsed selection
// either on the upstream or downstream edge.
return '';
}
}
return '---';
}