Skip to content

Commit 70eadad

Browse files
committed
Some clarifications
- don't use =foo as example, when the previous was =for, to avoid confusion - separate the rakudoc from the raku parts in examples
1 parent 8aa79a7 commit 70eadad

1 file changed

Lines changed: 15 additions & 5 deletions

File tree

‎doc/Type/RakuAST/Doc/Block.rakudoc‎

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ with $block {
104104
=end code
105105

106106
Returns a L<C<Bool>|/type/Bool> indicating the block is an abbreviated block
107-
(aka with just C<=> followed by the type, e.g. C<=foo>).
107+
(aka with just C<=> followed by the type, e.g. C<=bar>).
108108

109109
=head3 method directive
110110

@@ -179,11 +179,15 @@ The C<new> method can be called to create a new C<RakuAST::Doc::Block>
179179
object. It only takes named arguments, with the C<:type> argument
180180
being mandatory.
181181

182-
=begin code :lang<raku>
182+
=begin code :lang<rakudoc>
183183
=begin foo
184184
bar
185185
=end foo
186+
=end code
187+
188+
is equivalent to:
186189

190+
=begin code
187191
my $block = RakuAST::Doc::Block.new(
188192
:margin(" "),
189193
:type<foo>,
@@ -212,7 +216,9 @@ Any config to be associated with this block, defaults to none.
212216
Specified as an L<C<Associative>|/type/Associative>. Note that when specified, the
213217
values B<must> be C<RakuAST::> objects. So something like:
214218

215-
frobnicate => 42
219+
=begin code
220+
frobnicate => 42
221+
=end code
216222

217223
should be specified as:
218224

@@ -252,11 +258,15 @@ Create a C<RakuAST::Doc::Block> from a number of strings to be
252258
considered paragraphs. Strings are assumed to B<not> have removed
253259
the left margin yet.
254260

255-
=begin code :lang<raku>
261+
=begin code :lang<rakudoc>
256262
=begin foo
257263
bar
258264
=end foo
265+
=end code
259266

267+
is equivalent to:
268+
269+
=begin code
260270
my $block = RakuAST::Doc::Block.from-paragraphs(
261271
:margin(" "),
262272
:type<foo>,
@@ -265,7 +275,7 @@ my $block = RakuAST::Doc::Block.from-paragraphs(
265275
=end code
266276

267277
Takes the same arguments as C<new>. Note that the paragraphs should
268-
only contain strings and should B<not> contain the left margin
278+
only contain strings and should B<also> contain the left margin
269279
whitespace. A C<worry>/C<warning> will be issued if the left margin
270280
of a string is less than the margin indicated with C<:margin>.
271281

0 commit comments

Comments
 (0)