massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-pyright / node_modules / pyright / dist / typeshed-fallback / stubs / Markdown / markdown / core.pyi
1 from typing import Any, BinaryIO, Callable, ClassVar, Mapping, Sequence, Text, TextIO
2 from typing_extensions import Literal
3 from xml.etree.ElementTree import Element
4
5 from .blockparser import BlockParser
6 from .extensions import Extension
7 from .util import HtmlStash, Registry
8
9 class Markdown:
10     preprocessors: Registry
11     inlinePatterns: Registry
12     treeprocessors: Registry
13     postprocessors: Registry
14     parser: BlockParser
15     htmlStash: HtmlStash
16     output_formats: ClassVar[dict[Literal["xhtml", "html"], Callable[[Element], Text]]]
17     output_format: Literal["xhtml", "html"]
18     serializer: Callable[[Element], Text]
19     tab_length: int
20     block_level_elements: list[str]
21     def __init__(
22         self,
23         *,
24         extensions: Sequence[str | Extension] | None = ...,
25         extension_configs: Mapping[str, Mapping[str, Any]] | None = ...,
26         output_format: Literal["xhtml", "html"] | None = ...,
27         tab_length: int | None = ...,
28     ) -> None: ...
29     def build_parser(self) -> Markdown: ...
30     def registerExtensions(self, extensions: Sequence[Extension | str], configs: Mapping[str, Mapping[str, Any]]) -> Markdown: ...
31     def build_extension(self, ext_name: Text, configs: Mapping[str, str]) -> Extension: ...
32     def registerExtension(self, extension: Extension) -> Markdown: ...
33     def reset(self: Markdown) -> Markdown: ...
34     def set_output_format(self, format: Literal["xhtml", "html"]) -> Markdown: ...
35     def is_block_level(self, tag: str) -> bool: ...
36     def convert(self, source: Text) -> Text: ...
37     def convertFile(
38         self,
39         input: str | TextIO | BinaryIO | None = ...,
40         output: str | TextIO | BinaryIO | None = ...,
41         encoding: str | None = ...,
42     ) -> Markdown: ...
43
44 def markdown(
45     text: Text,
46     *,
47     extensions: Sequence[str | Extension] | None = ...,
48     extension_configs: Mapping[str, Mapping[str, Any]] | None = ...,
49     output_format: Literal["xhtml", "html"] | None = ...,
50     tab_length: int | None = ...,
51 ) -> Text: ...
52 def markdownFromFile(
53     *,
54     input: str | TextIO | BinaryIO | None = ...,
55     output: str | TextIO | BinaryIO | None = ...,
56     encoding: str | None = ...,
57     extensions: Sequence[str | Extension] | None = ...,
58     extension_configs: Mapping[str, Mapping[str, Any]] | None = ...,
59     output_format: Literal["xhtml", "html"] | None = ...,
60     tab_length: int | None = ...,
61 ) -> None: ...