Skip to content

Commit 7dc74d2

Browse files
committed
use the registry for writing operator files
1 parent d3024f0 commit 7dc74d2

File tree

1 file changed

+15
-14
lines changed

1 file changed

+15
-14
lines changed

htmlify.pl

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ (Bool :$debug, Bool :$typegraph = False)
219219
}
220220

221221
write-disambiguation-files();
222-
write-operator-files();
222+
write-operator-files($dr);
223223
write-type-graph-images(:force($typegraph));
224224
write-search-file();
225225
write-index-file();
@@ -428,20 +428,21 @@ (Bool :$debug, Bool :$typegraph = False)
428428
say "... done writing disambiguation files";
429429
}
430430

431-
sub write-operator-files() {
431+
sub write-operator-files($dr) {
432432
say "Writing operator files";
433-
for %operators.kv -> $what, %ops {
434-
for %ops.kv -> $op, $chunk {
435-
my $pod = pod-with-title(
436-
"$what.tclc() $op operator",
437-
pod-block(
438-
"Documentation for $what $op, extracted from ",
439-
pod-link("the operators language documentation", "/language/operators")
440-
),
441-
@$chunk
442-
);
443-
spurt "html/op/$what/$op.html", p2h($pod);
444-
}
433+
for $dr.lookup('operator', :by<kind>).list -> $doc {
434+
my $what = $doc.subkind;
435+
my $chunk = $doc.pod;
436+
my $op = $doc.name;
437+
my $pod = pod-with-title(
438+
"$what.tclc() $op operator",
439+
pod-block(
440+
"Documentation for $what $op, extracted from ",
441+
pod-link("the operators language documentation", "/language/operators")
442+
),
443+
@$chunk
444+
);
445+
spurt "html/op/$what/$op.html", p2h($pod);
445446
}
446447
}
447448

0 commit comments

Comments
 (0)