formatter
This module contains the classes that represent formatters.
Formatters are used to format the content that will be added in notes.
Formatter
Bases: ABC
Base class for all formatters.
format(value: str | list[str]) -> str | list[str]
abstractmethod
Format the content.
Parameters:
-
value
(str | list[str]
) –The content to format.
Returns:
-
str | list[str]
–The formatted content.
Source code in pyobsidian/formatter.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
|
FormatterContentInline
FormatterRelatedNoteInline
Bases: Formatter
This formatter adds "[[" and "]]" to each word entered and adds two line breaks at the beginning and end.
FormatterRelatedNoteOpMkHeader
Bases: FormatterRelatedNoteInline
This formatter adds "[[" and "]]" to each word entered and adds two line breaks at the beginning and end.
FormatterRelatedNoteYaml
FormatterTagInline
Bases: Formatter
This formatter adds "#" to each word entered and adds two line breaks at the beginning and end.
FormatterTagOpMkHeader
Bases: FormatterTagInline
This formatter adds "#" to each word entered and adds two line breaks at the beginning and end.