Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion stubs/Markdown/METADATA.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
version = "~=3.11.2"
version = "~=3.11.3"
upstream-repository = "https://github.com/Python-Markdown/markdown"
9 changes: 7 additions & 2 deletions stubs/Markdown/markdown/extensions/toc.pyi
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from collections.abc import Iterator, MutableSet
from re import Pattern
from typing import Any, TypedDict, type_check_only
from typing import Any, Protocol, TypedDict, type_check_only
from typing_extensions import deprecated
from xml.etree.ElementTree import Element

Expand All @@ -20,9 +20,14 @@ class _FlatTocToken(TypedDict):
class _TocToken(_FlatTocToken):
children: list[_TocToken]

@type_check_only
class _IdCounters(Protocol):
def get(self, key: str, default: int, /) -> int: ...
def __setitem__(self, key: str, value: int, /) -> None: ...

def slugify(value: str, separator: str, unicode: bool = False) -> str: ...
def slugify_unicode(value: str, separator: str) -> str: ...
def unique(id: str, ids: MutableSet[str]) -> str: ...
def unique(id: str, ids: MutableSet[str], counters: _IdCounters | None = None) -> str: ...
@deprecated("Use `render_inner_html` and `striptags` instead.")
def get_name(el: Element) -> str: ...
@deprecated("Use `run_postprocessors`, `render_inner_html` and/or `striptags` instead.")
Expand Down
2 changes: 2 additions & 0 deletions stubs/Markdown/markdown/inlinepatterns.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ class DelimiterProcessor(InlineProcessor):
def reset(self) -> None: ...
def increment_next_position(self, start: int, count: int) -> None: ...
def get_cached_result(self, pos: int, data: str) -> tuple[Element, int, int]: ...
@staticmethod
def rule_of_3(opener: int, closer: int) -> bool: ...
def get_match(self, data: str, start: int) -> re.Match[str] | None: ...
def search(self, data: str, start: int) -> re.Match[str] | None: ...
def add_region(self, delim: Delimiter, a: int, b: int, c: int, d: int, size: int) -> None: ...
Expand Down
Loading