StyleParser

Overview

StyleParser is a enum in Aspose.Words for Python.

Parser for DOCX style names and properties.

Values

ValueDescription
HEADING_PATTERNRepresents a regex that matches “Heading” followed by a number, case‑insensitive
SETEXT_HEADING_PATTERNRepresents a regex that matches “SetextHeading” followed by digits, case‑insensitive
QUOTE_PATTERNRepresents a regex that matches “Quote” optionally followed by digits, case‑insensitive
CODE_PATTERNRepresents a regex that matches optional prefixes (Fenced, Indented, Inline) followed by “Code” and optional word, case‑insensitive

Methods

SignatureDescription
parse(style_name: str)ParsedStyleParse a style name into structured information.
get_style_chain(style_names: list[str])list[ParsedStyle]Parse a chain of style names (for inherited styles).
is_setext_heading(style_name: str)boolCheck if style is a Setext-style heading.
extract_all_styles(style_chain: str)list[str]Extract individual style names from a comma-separated chain.