mirror of https://github.com/Textualize/rich.git
Add support for strikethrough text
This commit is contained in:
parent
d1813d2c93
commit
3f316c5ed3
|
@ -159,6 +159,7 @@ DEFAULT_STYLES: Dict[str, Style] = {
|
|||
"markdown.h7": Style(italic=True, dim=True),
|
||||
"markdown.link": Style(color="bright_blue"),
|
||||
"markdown.link_url": Style(color="blue", underline=True),
|
||||
"markdown.s": Style(strike=True),
|
||||
"iso8601.date": Style(color="blue"),
|
||||
"iso8601.time": Style(color="magenta"),
|
||||
"iso8601.timezone": Style(color="yellow"),
|
||||
|
|
|
@ -428,7 +428,7 @@ class Markdown(JupyterMixin):
|
|||
"image": ImageItem,
|
||||
}
|
||||
|
||||
inlines = {"em", "strong", "code", "strike"}
|
||||
inlines = {"em", "strong", "code", "s"}
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
|
@ -440,7 +440,7 @@ class Markdown(JupyterMixin):
|
|||
inline_code_lexer: Optional[str] = None,
|
||||
inline_code_theme: Optional[str] = None,
|
||||
) -> None:
|
||||
parser = MarkdownIt().enable("table")
|
||||
parser = MarkdownIt().enable("strikethrough")
|
||||
self.markup = markup
|
||||
self.parsed = parser.parse(markup)
|
||||
self.code_theme = code_theme
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# Tools
|
||||
|
||||
These are scripts used in the development of Rich, and aren't for general use. But feel free to look around.
|
||||
|
||||
Some ~~strikethrough~~ text.
|
||||
|
|
Loading…
Reference in New Issue