From f8b5b2dc1c45d3a79743c2c7a007551db277ee01 Mon Sep 17 00:00:00 2001 From: G <17325189+GeeCastro@users.noreply.github.com> Date: Sat, 16 Mar 2024 23:31:10 +0000 Subject: [PATCH] Update README.rst --- README.rst | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/README.rst b/README.rst index 21a5972..8d2b915 100644 --- a/README.rst +++ b/README.rst @@ -156,7 +156,7 @@ Creating Custom Converters If you have a special usecase that calls for a special conversion, you can always inherit from ``MarkdownConverter`` and override the method you want to -change: +change or add a function with the following pattern: `def convert_(self, el, text, convert_as_inline):`. The class will automatically run the corresponding tag content/element through it at conversion time. .. code:: python @@ -173,21 +173,6 @@ change: def md(html, **options): return ImageBlockConverter(**options).convert(html) -.. code:: python - - from markdownify import MarkdownConverter - - class NoCssConverter(MarkdownConverter): - """ - Create a custom MarkdownConverter that removes the CSS code by ignoring the `style` tag - """ - def convert_style(self, el, text, convert_as_inline): - return '' - - # Create shorthand method for conversion - def md(html, **options): - return NoCssConverter(**options).convert(html) - Command Line Interface