From 7ee87b1d3260250e2654c18056b1c55e18ca009e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20van=20Delft?= Date: Mon, 5 Apr 2021 10:50:23 +0200 Subject: [PATCH] Use .lower() on _style option fetching --- markdownify/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/markdownify/__init__.py b/markdownify/__init__.py index 5aa6f91..a23964c 100644 --- a/markdownify/__init__.py +++ b/markdownify/__init__.py @@ -159,7 +159,7 @@ class MarkdownConverter(object): if convert_as_inline: return "" - if self.options['newline_style'] == BACKSLASH: + if self.options['newline_style'].lower() == BACKSLASH: return '\\\n' else: return ' \n' @@ -175,7 +175,7 @@ class MarkdownConverter(object): if convert_as_inline: return text - style = self.options['heading_style'] + style = self.options['heading_style'].lower() text = text.rstrip() if style == UNDERLINED and n <= 2: line = '=' if n == 1 else '-'