File tree Expand file tree Collapse file tree 1 file changed +7
-17
lines changed Expand file tree Collapse file tree 1 file changed +7
-17
lines changed Original file line number Diff line number Diff line change @@ -431,12 +431,9 @@ multi sub node2inline(Pod::FormattingCode $node) returns Str {
431
431
432
432
# = Links
433
433
when ' L' {
434
- my $ url = node2inline($ node . content);
435
- my $ text = $ url ;
436
- if $ url ~~ /'|' / {
437
- $ text = $/ . prematch;
438
- $ url = $/ . postmatch;
439
- } elsif $ text ~~ /^ '#' / {
434
+ my $ text = node2inline($ node . content);
435
+ my $ url = $ node . meta[0 ] // $ text ;
436
+ if $ text ~~ /^ '#' / {
440
437
# if we have an internal-only link, strip the # from the text.
441
438
$ text = $/ . postmatch
442
439
}
@@ -453,24 +450,17 @@ multi sub node2inline(Pod::FormattingCode $node) returns Str {
453
450
}
454
451
455
452
when ' D' {
456
- # TODO memorise these definitions and display them properly
453
+ # TODO memorise these definitions (in $node.meta) and display them properly
457
454
my $ text = node2inline($ node . content);
458
- if $ text ~~ /'|' / {
459
- $ text = $/ . prematch;
460
- }
461
455
return qq [ <defn>{ $ text } </defn> ]
462
456
}
463
457
464
458
when ' X' {
465
459
# TODO do something with the crossrefs
466
460
my $ text = node2inline($ node . content);
467
- my $ defns = $ text ;
468
- if $ text ~~ /'|' / {
469
- $ defns = $/ . postmatch;
470
- $ text = $/ . prematch;
471
- }
472
- my @ indices = $ defns . split (/\s * ';' \s * /). map :
473
- { . split (/\s * ',' \s * /). join (" --" ) }
461
+ my @ indices = $ node . meta;
462
+ # my @indices = $defns.split(/\s*';'\s*/).map:
463
+ # { .split(/\s*','\s*/).join("--") }
474
464
% crossrefs {$ _ } = $ text for @ indices ;
475
465
return qq [ <span name="@ indices[ ] ">$text\< /span> ] ;
476
466
}
You can’t perform that action at this time.
0 commit comments