@@ -375,7 +375,7 @@ class ContentExample {
375
375
QuotationNode ([ParagraphNode (links: null , nodes: [TextNode ('words' )])])
376
376
]);
377
377
378
- static final codeBlockPlain = ContentExample (
378
+ static const codeBlockPlain = ContentExample (
379
379
'code block without syntax highlighting' ,
380
380
"```\n verb\n atim\n ```" ,
381
381
expectedText: 'verb\n atim' ,
@@ -387,7 +387,7 @@ class ContentExample {
387
387
]),
388
388
]);
389
389
390
- static final codeBlockHighlightedShort = ContentExample (
390
+ static const codeBlockHighlightedShort = ContentExample (
391
391
'code block with syntax highlighting' ,
392
392
"```dart\n class A {}\n ```" ,
393
393
expectedText: 'class A {}' ,
@@ -408,7 +408,7 @@ class ContentExample {
408
408
]),
409
409
]);
410
410
411
- static final codeBlockHighlightedMultiline = ContentExample (
411
+ static const codeBlockHighlightedMultiline = ContentExample (
412
412
'code block, multiline, with syntax highlighting' ,
413
413
'```rust\n fn main() {\n print!("Hello ");\n\n print!("world!\\ n");\n }\n ```' ,
414
414
expectedText: 'fn main() {\n print!("Hello ");\n\n print!("world!\\ n");\n }' ,
@@ -459,7 +459,7 @@ class ContentExample {
459
459
]),
460
460
]);
461
461
462
- static final codeBlockSpansWithMultipleClasses = ContentExample (
462
+ static const codeBlockSpansWithMultipleClasses = ContentExample (
463
463
'code block spans with multiple CSS classes' ,
464
464
'```yaml\n - item\n ```' ,
465
465
expectedText: '- item' ,
@@ -492,18 +492,22 @@ class ContentExample {
492
492
'code block, with syntax highlighting and highlighted lines' ,
493
493
'```\n ::markdown hl_lines="2 4"\n # he\n ## llo\n ### world\n ```' ,
494
494
'<div class="codehilite"><pre>'
495
- '<span></span><code>::markdown hl_lines="2 4"\n '
496
- '<span class="hll"><span class="gh"># he</span>\n '
497
- '</span><span class="gu">## llo</span>\n '
498
- '<span class="hll"><span class="gu">### world</span>\n '
499
- '</span></code></pre></div>' , [
500
- // TODO: Fix this, see comment under `CodeBlockSpanType.highlightedLines` case in lib/model/content.dart.
501
- blockUnimplemented ('<div class="codehilite"><pre>'
502
- '<span></span><code>::markdown hl_lines="2 4"\n '
503
- '<span class="hll"><span class="gh"># he</span>\n '
504
- '</span><span class="gu">## llo</span>\n '
505
- '<span class="hll"><span class="gu">### world</span>\n '
506
- '</span></code></pre></div>' ),
495
+ '<span></span>'
496
+ '<code>'
497
+ '::markdown hl_lines="2 4"\n '
498
+ '<span class="hll">'
499
+ '<span class="gh"># he</span>\n </span>'
500
+ '<span class="gu">## llo</span>\n '
501
+ '<span class="hll">'
502
+ '<span class="gu">### world</span>\n </span></code></pre></div>' , [
503
+ CodeBlockNode ([
504
+ CodeBlockSpanNode (text: '::markdown hl_lines="2 4"\n ' , spanTypes: [CodeBlockSpanType .text]),
505
+ CodeBlockSpanNode (text: '# he' , spanTypes: [CodeBlockSpanType .highlightedLines, CodeBlockSpanType .genericHeading]),
506
+ CodeBlockSpanNode (text: '\n ' , spanTypes: [CodeBlockSpanType .highlightedLines]),
507
+ CodeBlockSpanNode (text: '## llo' , spanTypes: [CodeBlockSpanType .genericSubheading]),
508
+ CodeBlockSpanNode (text: '\n ' , spanTypes: [CodeBlockSpanType .text]),
509
+ CodeBlockSpanNode (text: '### world' , spanTypes: [CodeBlockSpanType .highlightedLines, CodeBlockSpanType .genericSubheading]),
510
+ ]),
507
511
]);
508
512
509
513
static final codeBlockWithUnknownSpanType = ContentExample (
@@ -517,7 +521,7 @@ class ContentExample {
517
521
'\n </code></pre></div>' ),
518
522
]);
519
523
520
- static final codeBlockFollowedByMultipleLineBreaks = ContentExample (
524
+ static const codeBlockFollowedByMultipleLineBreaks = ContentExample (
521
525
'blank text nodes after code blocks' ,
522
526
' code block.\n\n some content' ,
523
527
// https://chat.zulip.org/#narrow/stream/7-test-here/near/1774823
@@ -2099,7 +2103,7 @@ void main() async {
2099
2103
// "1. > ###### two\n > * three\n\n four"
2100
2104
'<ol>\n <li>\n <blockquote>\n <h6>two</h6>\n <ul>\n <li>three</li>\n '
2101
2105
'</ul>\n </blockquote>\n <div class="codehilite"><pre><span></span>'
2102
- '<code>four\n </code></pre></div>\n\n </li>\n </ol>' , [
2106
+ '<code>four\n </code></pre></div>\n\n </li>\n </ol>' , const [
2103
2107
OrderedListNode (start: 1 , [[
2104
2108
QuotationNode ([
2105
2109
HeadingNode (level: HeadingLevel .h6, links: null , nodes: [TextNode ('two' )]),
0 commit comments