StyleParser
Overview
StyleParser is a enum in Aspose.Words for Python.
Parser for DOCX style names and properties.
Values
| Value | Description |
|---|---|
HEADING_PATTERN | Represents a regex that matches “Heading” followed by a number, case‑insensitive |
SETEXT_HEADING_PATTERN | Represents a regex that matches “SetextHeading” followed by digits, case‑insensitive |
QUOTE_PATTERN | Represents a regex that matches “Quote” optionally followed by digits, case‑insensitive |
CODE_PATTERN | Represents a regex that matches optional prefixes (Fenced, Indented, Inline) followed by “Code” and optional word, case‑insensitive |
Methods
| Signature | Description |
|---|---|
parse(style_name: str) → ParsedStyle | Parse 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) → bool | Check if style is a Setext-style heading. |
extract_all_styles(style_chain: str) → list[str] | Extract individual style names from a comma-separated chain. |