Markup · Term.jl

# Markup

- `Term.markup.MarkupTag`
- `Term.markup.SingleTag`
- `Term.markup.SingleTag`
- `Term.markup.clean_nested_tags`
- `Term.markup.clean_nested_tags`
- `Term.markup.extract_markup`
- `Term.markup.has_markup`
- `Term.markup.pairup_tags`

`Term.markup.MarkupTag` — Type

    MarkupTag

Represents a complete markup tag.

It stores two `SingleTag`, the text inbetween and any other `MarkupTag` that was detected in that text.

source
`Term.markup.SingleTag` — Type

    SingleTag

Represents a single tag `[style]` or `[/style]`

source
`Term.markup.SingleTag` — Method

    SingleTag(match::RegexMatch)

Construct a `SingleTag` out of a `RegexMatch`

source
`Term.markup.clean_nested_tags` — Method

    clean_nested_tags(text::AbstractString)::AbstractString

Given a text with nested string like: `[red]aaaa [green]bbbb[/green] cccc [blue] ddddd [/blue]eeee[/red]`

it adds extra tags to ensure that text within inner tags is handled properly, giving: `[red]aaaa [green]bbbb[/green][red] cccc [/red][blue] ddddd [/blue][red]eeee[/red]`

source
`Term.markup.clean_nested_tags` — Method

    clean_nested_tags(tag, text::AbstractString)

recursively applies to inner tags

source
`Term.markup.extract_markup` — Method

    extract_markup(input_text::AbstractString; firstonly=false)

Extracts `MarkupTag`s from a piece of text.

source
`Term.markup.has_markup` — Method

    has_markup(text::AbstractString)

Returns `true` if `text` includes a `MarkupTag`

source
`Term.markup.pairup_tags` — Method

    pairup_tags(text::Vector{AbstractString})

Given a vector of string with markup tags not properly closed/opened across lines, it fixes things up.

source

Theme

This document was generated with Documenter.jl version 0.27.14 on Wednesday 9 March 2022. Using Julia version 1.6.5.