@@ -382,7 +382,7 @@ class ContentExample {
382
382
QuotationNode ([ParagraphNode (links: null , nodes: [TextNode ('words' )])])
383
383
]);
384
384
385
- static final codeBlockPlain = ContentExample (
385
+ static const codeBlockPlain = ContentExample (
386
386
'code block without syntax highlighting' ,
387
387
"```\n verb\n atim\n ```" ,
388
388
expectedText: 'verb\n atim' ,
@@ -394,7 +394,7 @@ class ContentExample {
394
394
]),
395
395
]);
396
396
397
- static final codeBlockHighlightedShort = ContentExample (
397
+ static const codeBlockHighlightedShort = ContentExample (
398
398
'code block with syntax highlighting' ,
399
399
"```dart\n class A {}\n ```" ,
400
400
expectedText: 'class A {}' ,
@@ -415,7 +415,7 @@ class ContentExample {
415
415
]),
416
416
]);
417
417
418
- static final codeBlockHighlightedMultiline = ContentExample (
418
+ static const codeBlockHighlightedMultiline = ContentExample (
419
419
'code block, multiline, with syntax highlighting' ,
420
420
'```rust\n fn main() {\n print!("Hello ");\n\n print!("world!\\ n");\n }\n ```' ,
421
421
expectedText: 'fn main() {\n print!("Hello ");\n\n print!("world!\\ n");\n }' ,
@@ -466,7 +466,7 @@ class ContentExample {
466
466
]),
467
467
]);
468
468
469
- static final codeBlockSpansWithMultipleClasses = ContentExample (
469
+ static const codeBlockSpansWithMultipleClasses = ContentExample (
470
470
'code block spans with multiple CSS classes' ,
471
471
'```yaml\n - item\n ```' ,
472
472
expectedText: '- item' ,
@@ -499,18 +499,22 @@ class ContentExample {
499
499
'code block, with syntax highlighting and highlighted lines' ,
500
500
'```\n ::markdown hl_lines="2 4"\n # he\n ## llo\n ### world\n ```' ,
501
501
'<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>' , [
507
- // TODO: Fix this, see comment under `CodeBlockSpanType.highlightedLines` case in lib/model/content.dart.
508
- blockUnimplemented ('<div class="codehilite"><pre>'
509
- '<span></span><code>::markdown hl_lines="2 4"\n '
510
- '<span class="hll"><span class="gh"># he</span>\n '
511
- '</span><span class="gu">## llo</span>\n '
512
- '<span class="hll"><span class="gu">### world</span>\n '
513
- '</span></code></pre></div>' ),
502
+ '<span></span>'
503
+ '<code>'
504
+ '::markdown hl_lines="2 4"\n '
505
+ '<span class="hll">'
506
+ '<span class="gh"># he</span>\n </span>'
507
+ '<span class="gu">## llo</span>\n '
508
+ '<span class="hll">'
509
+ '<span class="gu">### world</span>\n </span></code></pre></div>' , [
510
+ CodeBlockNode ([
511
+ CodeBlockSpanNode (text: '::markdown hl_lines="2 4"\n ' , spanTypes: [CodeBlockSpanType .text]),
512
+ CodeBlockSpanNode (text: '# he' , spanTypes: [CodeBlockSpanType .highlightedLines, CodeBlockSpanType .genericHeading]),
513
+ CodeBlockSpanNode (text: '\n ' , spanTypes: [CodeBlockSpanType .highlightedLines]),
514
+ CodeBlockSpanNode (text: '## llo' , spanTypes: [CodeBlockSpanType .genericSubheading]),
515
+ CodeBlockSpanNode (text: '\n ' , spanTypes: [CodeBlockSpanType .text]),
516
+ CodeBlockSpanNode (text: '### world' , spanTypes: [CodeBlockSpanType .highlightedLines, CodeBlockSpanType .genericSubheading]),
517
+ ]),
514
518
]);
515
519
516
520
static final codeBlockWithUnknownSpanType = ContentExample (
@@ -524,7 +528,7 @@ class ContentExample {
524
528
'\n </code></pre></div>' ),
525
529
]);
526
530
527
- static final codeBlockFollowedByMultipleLineBreaks = ContentExample (
531
+ static const codeBlockFollowedByMultipleLineBreaks = ContentExample (
528
532
'blank text nodes after code blocks' ,
529
533
' code block.\n\n some content' ,
530
534
// https://chat.zulip.org/#narrow/stream/7-test-here/near/1774823
@@ -2060,7 +2064,7 @@ void main() async {
2060
2064
// "1. > ###### two\n > * three\n\n four"
2061
2065
'<ol>\n <li>\n <blockquote>\n <h6>two</h6>\n <ul>\n <li>three</li>\n '
2062
2066
'</ul>\n </blockquote>\n <div class="codehilite"><pre><span></span>'
2063
- '<code>four\n </code></pre></div>\n\n </li>\n </ol>' , [
2067
+ '<code>four\n </code></pre></div>\n\n </li>\n </ol>' , const [
2064
2068
OrderedListNode (start: 1 , [[
2065
2069
QuotationNode ([
2066
2070
HeadingNode (level: HeadingLevel .h6, links: null , nodes: [TextNode ('two' )]),
0 commit comments