This version of the module is deprecated: Use moonbitlang/docx2html instead

    bobzhang/docx2html/style_map does not have a README file

    DocumentMatcher

    pub(all) enum DocumentMatcher {
    ParagraphMatcher(style_id~ : String?, style_name~ : StyleNameMatcher?, numbering~ :
    Numbering
    ?)
    RunMatcher(style_id~ : String?, style_name~ : StyleNameMatcher?)
    RunPropertyMatcher(String)
    HighlightMatcher(String?)
    TableMatcher(style_id~ : String?, style_name~ : StyleNameMatcher?)
    BreakMatcher(
    BreakType
    )
    CommentReferenceMatcher
    } derive(Eq,
    Debug
    )

    Matcher for document elements in style-map rules.

    DocumentMatcher::matches

    Returns whether this matcher accepts the document element.

    HtmlPathElement

    pub(all) struct HtmlPathElement {
    tag : String
    attributes : Map[String, String]
    fresh : Bool
    separator : String?
    } derive(Eq,
    Debug
    )

    One element in a parsed style-map HTML path.

    StyleMapParseResult

    pub(all) struct StyleMapParseResult {
    mappings : Array[StyleMapping]
    messages : Array[
    Message
    ]
    } derive(Eq,
    Debug
    )

    Parsed style mappings together with style-map diagnostics.

    StyleMapping

    pub(all) struct StyleMapping {
    from : DocumentMatcher
    to : Array[HtmlPathElement]
    } derive(Eq,
    Debug
    )

    Parsed mapping from a document matcher to an HTML path.

    StyleNameMatcher

    pub(all) enum StyleNameMatcher {
    ExactStyleName(String)
    PrefixStyleName(String)
    } derive(Eq,
    Debug
    )

    Matcher for style names in style-map rules.

    default_style_map_lines

    fn default_style_map_lines() -> Array[String]

    Returns Mammoth-compatible default style-map lines.

    find_style_mapping

    Finds the first style mapping that matches an element.

    parse_style_map

    fn parse_style_map(lines : Array[String]) -> StyleMapParseResult

    Parses style-map lines and preserves diagnostics.

    parse_style_map_string

    fn parse_style_map_string(style_map : String) -> StyleMapParseResult

    Parses a style-map string and preserves diagnostics.

    read_style_map

    fn read_style_map(lines : Array[String]) -> Array[StyleMapping]

    Parses style-map lines and returns valid mappings.

    read_style_map_string

    fn read_style_map_string(style_map : String) -> Array[String]

    Splits a style-map string into meaningful lines.

    read_style_map_with_messages

    fn read_style_map_with_messages(lines : Array[String]) -> StyleMapParseResult

    Parses style-map lines with diagnostics.

    read_style_mapping

    fn read_style_mapping(line : String) -> StyleMapping?

    Parses one style-map line into a mapping, if valid.