File tree Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Original file line number Diff line number Diff line change 4
4
5
5
= SUBTITLE An easy-to-use markup language
6
6
7
- Perl 6 pod is an easy-to-use markup language. Pod can be used for writing
8
- language documentation, for documenting programs and modules, as well as for
9
- other types of document composition.
7
+ Perl 6 pod is an easy-to-use markup language. Pod can be used for
8
+ writing language documentation, for documenting programs and modules, as
9
+ well as for other types of document composition.
10
10
11
11
Every Pod document has to begin with C < =begin pod > and end with C < =end pod > .
12
12
Everything between these two delimiters will be processed and used to generate
Original file line number Diff line number Diff line change @@ -181,6 +181,7 @@ sub write-Language-files() {
181
181
my $ to = " $ todir /{ $ page-order } -{ $ fname } " ;
182
182
say " DEBUG: to '$ to '" if $ debug ;
183
183
my $ fh = open $ to , : w;
184
+ my $ line-no = 1 ;
184
185
for $ from . IO . lines -> $ line is copy {
185
186
if $ line ~~ /^ \h * '=begin' \h * pod / {
186
187
# check any existing :page-order entry
@@ -189,12 +190,17 @@ sub write-Language-files() {
189
190
}
190
191
else {
191
192
# $fh.say: "$line :page-order<{$page-order}>";
192
- $ fh . say : " # THIS FILE IS AUTO-GENERATED--ALL EDITS WILL BE LOST" ;
193
- $ fh . say : $ line ~ " :link<$ key-fname >" ;
194
- # $fh.say: "=comment THIS FILE IS AUTO-GENERATED--ALL EDITS WILL BE LOST";
193
+ if $ line-no < 5 {
194
+ $ fh . say : " # THIS FILE IS AUTO-GENERATED--ALL EDITS WILL BE LOST" ;
195
+ $ fh . say : $ line ~ " :link<$ key-fname >" ;
196
+ # $fh.say: "=comment THIS FILE IS AUTO-GENERATED--ALL EDITS WILL BE LOST";
197
+ } else {
198
+ $ fh . say : $ line ;
199
+ }
195
200
}
196
201
next ;
197
202
}
203
+ $ line-no ++ ;
198
204
$ fh . say : $ line ;
199
205
}
200
206
$ fh . close ;
You can’t perform that action at this time.
0 commit comments