We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8904fd5 commit 22ba75eCopy full SHA for 22ba75e
lib/utils/html/html_muncher.dart
@@ -582,7 +582,9 @@ final class _Muncher with LoggerMixin {
582
}
583
584
List<InlineSpan>? _buildBlockCode(uh.Element element) {
585
- final text = element.querySelector('div')?.innerText.trim() ?? '';
+ // Usually each line in the block code is ended with `<br>` tag, but rarely it does not.
586
+ // To ensure each line is wrapped correctly, extract each line (contents in each `<div>`) and manually place them.
587
+ final text = element.querySelectorAll('div ol li').map((e) => e.innerText.trim()).join('\n');
588
state
589
..headingBrNodePassed = true
590
..elevation += _elevationStep;
0 commit comments