Snapd.MarkdownParser¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
None
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class Snapd.MarkdownParser(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Snapd.MarkdownParser
is an opaque data structure and can only be accessed using the provided functions.New in version 1.48.
- classmethod new(version)¶
- Parameters:
version (
Snapd.MarkdownVersion
) – version supported by the client.- Returns:
a new
Snapd.MarkdownParser
- Return type:
Create an object to parse markdown text.
New in version 1.48.
- get_preserve_whitespace()¶
-
Check if paragraph whitespace will be kept intact.
New in version 1.48.
- parse(text)¶
- Parameters:
text (
str
) – text to parse.- Returns:
Text split into blocks.
- Return type:
Convert text in snapd markdown format to markup.
New in version 1.48.
- set_preserve_whitespace(preserve_whitespace)¶
-
Consecutive paragraph whitespace (space, tabs, newlines) is automatically combined into a single space character. This renders the paragraphs in the form that HTML uses. If you need the original whitespace that the markdown author wrote then set this to
False
.New in version 1.48.