-
-
Notifications
You must be signed in to change notification settings - Fork 2k
markdown: improve preprocessors type #4588
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,14 +1,14 @@ | ||
| from typing import Any, Pattern | ||
| from typing import Any, List, Pattern | ||
|
|
||
| from . import util | ||
|
|
||
| def build_preprocessors(md, **kwargs): ... | ||
|
|
||
| class Preprocessor(util.Processor): | ||
| def run(self, lines) -> None: ... | ||
| def run(self, lines: List[str]) -> List[str]: ... | ||
|
|
||
| class NormalizeWhitespace(Preprocessor): | ||
| def run(self, lines): ... | ||
| def run(self, lines: List[str]) -> List[str]: ... | ||
hauntsaninja marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| class HtmlBlockPreprocessor(Preprocessor): | ||
| right_tag_patterns: Any | ||
|
|
@@ -17,10 +17,10 @@ class HtmlBlockPreprocessor(Preprocessor): | |
| attrs_re: Any | ||
| left_tag_re: Any | ||
| markdown_in_raw: bool = ... | ||
| def run(self, lines): ... | ||
| def run(self, lines: List[str]) -> List[str]: ... | ||
hauntsaninja marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| class ReferencePreprocessor(Preprocessor): | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This class doesn't exist in the file you linked to?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good spot, looks like it got removed eight days ago, changes haven't been released
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good timing. Out of scope for this PR then.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For what it's worth it looks like this one actually did need a List |
||
| TITLE: str = ... | ||
| RE: Pattern | ||
| TITLE_RE: Pattern | ||
| def run(self, lines): ... | ||
| def run(self, lines: List[str]) -> List[str]: ... | ||
Uh oh!
There was an error while loading. Please reload this page.