NAME
Text::Amuse::Element - Helper for Text::Amuse
METHODS/ACCESSORS
Everything here is pretty much internal only, underdocumented and subject to change.
new(%args)
Constructor
rawline
Accessor to the raw input line
raw_without_anchors
Return the original string, but with anchors stripped out.
will_not_merge
Attribute to mark if an element cannot be further merged
anchors
A list of anchors for this element.
add_to_anchors(@list)
Add the anchors passed to the constructor to this element.
remove_anchors
Empty the anchors array in the element
move_anchors_to($element)
Remove the anchors from this element and add them to the one passed as argument.
ACCESSORS
The following accessors set the value if an argument is provided.
block
The block the string belongs
type
The type
string
The string (without the indentation or the leading markup)
removed
The portion of the string stripped out
style
The block style. Default to X
, read only. Used for aliases of tags, when closing it requires a matching style.
indentation
The indentation level, as a numerical value
footnote_number
The footnote number
footnote_symbol
The footnote symbol
footnote_index
The footnote index
attribute
Accessor to attribute
attribute_type
Accessor to attribute_type
start_list_index
Accessor rw to start_list_index (defaults to 0)
HELPERS
is_start_block($blockname)
Return true if the element is a "startblock" of the required block name
is_stop_element($element)
Return true if the element is a matching stopblock for the element passed as argument.
is_regular_maybe
Return true if the element is "regular", i.e., it just have trailing white space
can_merge_next
Return true if the element will merge the next one
can_be_merged
Return true if the element will merge the next one. Only regular strings.
can_be_in_list
Return true if the element can be inside a list
can_be_regular
Return true if the element is quote, center, right
should_close_blocks
add_to_string($string, $other_string, [...])
Append (just concatenate) the given strings to the string attribute.
append($element)
Append the element passed as argument to this one, setting the raw_line
can_append($element)
become_regular
Set block to empty string and type to regular
element_number
Internal numbering of the element.
is_header
Return 1 if the element type is h1/h6, 0 otherwise.