RakuAST::Doc::Paragraph class contains the information about a logical paragraph in a
RakuAST functionality is available in language version
6.e+ and was added in Rakudo compiler release 2023.02. In earlier language versions it is only available when specifying:
use experimental :rakuast;
RakuAST::Doc::Paragraph objects are typically created when parsing Raku Programming Language code that has
RakuDoc markers in it. So most developers will only need to know how to introspect the objects created.
.put for .atoms;# Text before ␤B<and>␤ after markup␤
Returns the atoms of the paragraph. These are generally a mix of strings and
put ; # Text before B<and> after markup␤␤
Returns the string for the paragraph, with any markup stringified.
# method .gist falls back to .rakusay ; # RakuAST::Doc::Paragraph.new(...
Returns the string that is needed for the creation of the paragraph using
One seldom creates
RakuAST::Doc::Paragraph objects directly. This documentation is intended for those few people who'd like to devise their own way of programmatically building a
new method must be called to create a new
RakuAST::Doc::Paragraph object. It takes any number of positional arguments as the atoms of the logical paragraph, where an atom is either a string or a
RakuAST::Doc::Paragraph object is only created if a logical paragraph has at least one markup object.
my = RakuAST::Doc::Paragraph.new("Text before ",RakuAST::Doc::Markup.new(:letter<B>, :atoms("and"))," after markup\n");
Add an atom: should be a string, or a