From 23f18866c342968f5819495596fcb24f5dcc8b85 Mon Sep 17 00:00:00 2001 From: squidfunk Date: Thu, 22 Feb 2024 20:24:08 +0700 Subject: [PATCH] Removed manually added instant previews in light of new extension --- docs/reference/admonitions.md | 6 +++--- docs/reference/annotations.md | 6 +++--- docs/reference/buttons.md | 2 +- docs/reference/code-blocks.md | 8 ++++---- docs/reference/content-tabs.md | 4 ++-- docs/reference/data-tables.md | 2 +- docs/reference/footnotes.md | 2 +- docs/reference/formatting.md | 6 +++--- docs/reference/grids.md | 4 ++-- docs/reference/images.md | 4 ++-- docs/reference/lists.md | 4 ++-- docs/reference/tooltips.md | 6 +++--- material/overrides/hooks/shortcodes.py | 1 - src/overrides/hooks/shortcodes.py | 1 - 14 files changed, 27 insertions(+), 29 deletions(-) diff --git a/docs/reference/admonitions.md b/docs/reference/admonitions.md index 03b163567..0bcf9e863 100644 --- a/docs/reference/admonitions.md +++ b/docs/reference/admonitions.md @@ -24,9 +24,9 @@ markdown_extensions: See additional configuration options: -- [Admonition]{ data-preview="" } -- [Details]{ data-preview="" } -- [SuperFences]{ data-preview="" } +- [Admonition] +- [Details] +- [SuperFences] [Admonition]: ../setup/extensions/python-markdown.md#admonition [Details]: ../setup/extensions/python-markdown-extensions.md#details diff --git a/docs/reference/annotations.md b/docs/reference/annotations.md index 3f428a12b..2ee13c12b 100644 --- a/docs/reference/annotations.md +++ b/docs/reference/annotations.md @@ -23,9 +23,9 @@ markdown_extensions: See additional configuration options: -- [Attribute Lists]{ data-preview="" } -- [Markdown in HTML]{ data-preview="" } -- [SuperFences]{ data-preview="" } +- [Attribute Lists] +- [Markdown in HTML] +- [SuperFences] [Attribute Lists]: ../setup/extensions/python-markdown.md#attribute-lists [Markdown in HTML]: ../setup/extensions/python-markdown.md#markdown-in-html diff --git a/docs/reference/buttons.md b/docs/reference/buttons.md index 83735c68f..03dcb6dc9 100644 --- a/docs/reference/buttons.md +++ b/docs/reference/buttons.md @@ -21,7 +21,7 @@ markdown_extensions: See additional configuration options: -- [Attribute Lists]{ data-preview="" } +- [Attribute Lists] [Attribute Lists]: ../setup/extensions/python-markdown.md#attribute-lists diff --git a/docs/reference/code-blocks.md b/docs/reference/code-blocks.md index 10756bc69..4ac278ad8 100644 --- a/docs/reference/code-blocks.md +++ b/docs/reference/code-blocks.md @@ -34,10 +34,10 @@ JavaScript syntax highlighter. See additional configuration options: -- [Highlight]{ data-preview="" } -- [InlineHilite]{ data-preview="" } -- [SuperFences]{ data-preview="" } -- [Snippets]{ data-preview="" } +- [Highlight] +- [InlineHilite] +- [SuperFences] +- [Snippets] [Highlight]: ../setup/extensions/python-markdown-extensions.md#highlight [InlineHilite]: ../setup/extensions/python-markdown-extensions.md#inlinehilite diff --git a/docs/reference/content-tabs.md b/docs/reference/content-tabs.md index f16e990aa..ded76bea1 100644 --- a/docs/reference/content-tabs.md +++ b/docs/reference/content-tabs.md @@ -24,8 +24,8 @@ markdown_extensions: See additional configuration options: -- [SuperFences]{ data-preview="" } -- [Tabbed]{ data-preview="" } +- [SuperFences] +- [Tabbed] [SuperFences]: ../setup/extensions/python-markdown-extensions.md#superfences [Tabbed]: ../setup/extensions/python-markdown-extensions.md#tabbed diff --git a/docs/reference/data-tables.md b/docs/reference/data-tables.md index 31cb4dff6..fd2db1bf1 100644 --- a/docs/reference/data-tables.md +++ b/docs/reference/data-tables.md @@ -24,7 +24,7 @@ markdown_extensions: See additional configuration options: -- [Tables]{ data-preview="" } +- [Tables] [Tables]: ../setup/extensions/python-markdown.md#tables diff --git a/docs/reference/footnotes.md b/docs/reference/footnotes.md index 7e703094c..1a2ec5ca3 100644 --- a/docs/reference/footnotes.md +++ b/docs/reference/footnotes.md @@ -22,7 +22,7 @@ markdown_extensions: See additional configuration options: -- [Footnotes]{ data-preview="" } +- [Footnotes] [Footnotes]: ../setup/extensions/python-markdown.md#footnotes diff --git a/docs/reference/formatting.md b/docs/reference/formatting.md index 09bb73c77..cdfa00ff2 100644 --- a/docs/reference/formatting.md +++ b/docs/reference/formatting.md @@ -28,9 +28,9 @@ markdown_extensions: See additional configuration options: -- [Critic]{ data-preview="" } -- [Caret, Mark & Tilde]{ data-preview="" } -- [Keys]{ data-preview="" } +- [Critic] +- [Caret, Mark & Tilde] +- [Keys] [Critic]: ../setup/extensions/python-markdown-extensions.md#critic [Caret, Mark & Tilde]: ../setup/extensions/python-markdown-extensions.md#caret-mark-tilde diff --git a/docs/reference/grids.md b/docs/reference/grids.md index 9596808b4..10af8d55b 100644 --- a/docs/reference/grids.md +++ b/docs/reference/grids.md @@ -26,8 +26,8 @@ markdown_extensions: # (1)! See additional configuration options: -- [Attribute Lists]{ data-preview="" } -- [Markdown in HTML]{ data-preview="" } +- [Attribute Lists] +- [Markdown in HTML] [icons and emojis]: icons-emojis.md [configured separately]: icons-emojis.md#configuration diff --git a/docs/reference/images.md b/docs/reference/images.md index 75b879dbe..cc9898dda 100644 --- a/docs/reference/images.md +++ b/docs/reference/images.md @@ -23,8 +23,8 @@ markdown_extensions: See additional configuration options: -- [Attribute Lists]{ data-preview="" } -- [Markdown in HTML]{ data-preview="" } +- [Attribute Lists] +- [Markdown in HTML] [Attribute Lists]: ../setup/extensions/python-markdown.md#attribute-lists [Markdown in HTML]: ../setup/extensions/python-markdown.md#markdown-in-html diff --git a/docs/reference/lists.md b/docs/reference/lists.md index ac9774b0b..1de7e7bb3 100644 --- a/docs/reference/lists.md +++ b/docs/reference/lists.md @@ -24,8 +24,8 @@ markdown_extensions: See additional configuration options: -- [Definition Lists]{ data-preview="" } -- [Tasklist]{ data-preview="" } +- [Definition Lists] +- [Tasklist] [Definition Lists]: ../setup/extensions/python-markdown.md#definition-lists [Tasklist]: ../setup/extensions/python-markdown-extensions.md#tasklist diff --git a/docs/reference/tooltips.md b/docs/reference/tooltips.md index 5c384d27a..55e853879 100644 --- a/docs/reference/tooltips.md +++ b/docs/reference/tooltips.md @@ -24,9 +24,9 @@ markdown_extensions: See additional configuration options: -- [Abbreviations]{ data-preview="" } -- [Attribute Lists]{ data-preview="" } -- [Snippets]{ data-preview="" } +- [Abbreviations] +- [Attribute Lists] +- [Snippets] [Abbreviations]: ../setup/extensions/python-markdown.md#abbreviations [Attribute Lists]: ../setup/extensions/python-markdown.md#attribute-lists diff --git a/material/overrides/hooks/shortcodes.py b/material/overrides/hooks/shortcodes.py index eb4437a50..faba23323 100644 --- a/material/overrides/hooks/shortcodes.py +++ b/material/overrides/hooks/shortcodes.py @@ -113,7 +113,6 @@ def _resolve(file: File, page: Page): # Create badge def _badge(icon: str, text: str = "", type: str = ""): classes = f"mdx-badge mdx-badge--{type}" if type else "mdx-badge" - text = f"{text}{{ data-preview='' }}" if text.endswith(")") else text return "".join([ f"", *([f"{icon}"] if icon else []), diff --git a/src/overrides/hooks/shortcodes.py b/src/overrides/hooks/shortcodes.py index eb4437a50..faba23323 100644 --- a/src/overrides/hooks/shortcodes.py +++ b/src/overrides/hooks/shortcodes.py @@ -113,7 +113,6 @@ def _resolve(file: File, page: Page): # Create badge def _badge(icon: str, text: str = "", type: str = ""): classes = f"mdx-badge mdx-badge--{type}" if type else "mdx-badge" - text = f"{text}{{ data-preview='' }}" if text.endswith(")") else text return "".join([ f"", *([f"{icon}"] if icon else []),