From 5bd69aeb269fd6c862791384a1d334d2559ca7f1 Mon Sep 17 00:00:00 2001 From: facelessuser Date: Mon, 17 Aug 2020 08:29:32 -0600 Subject: [PATCH] Don't strip newlines --- docs/src/markdown/about/changelog.md | 4 ++++ st3/mdpopups/__init__.py | 4 ++-- st3/mdpopups/version.py | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/src/markdown/about/changelog.md b/docs/src/markdown/about/changelog.md index 96b49ea..99e0011 100644 --- a/docs/src/markdown/about/changelog.md +++ b/docs/src/markdown/about/changelog.md @@ -1,5 +1,9 @@ # Changelog +## 3.7.5 + +- **FIX**: Don't strip newlines from content that has `nl2br` disabled. + ## 3.7.4 - **FIX**: Fix plain text syntax highlighting not always being applied correctly as the fallback. diff --git a/st3/mdpopups/__init__.py b/st3/mdpopups/__init__.py index 6612f70..cbb2f57 100644 --- a/st3/mdpopups/__init__.py +++ b/st3/mdpopups/__init__.py @@ -417,7 +417,7 @@ def md2html( ] ) - # Use legacy method to determine if `nl2b` should be used + # Use legacy method to determine if `nl2br` should be used if nl2br: extensions.append('markdown.extensions.nl2br') else: @@ -438,7 +438,7 @@ def md2html( extension_configs=configs, sublime_hl=sublime_hl, allow_code_wrap=fm.get('allow_code_wrap', allow_code_wrap) - ).convert(_markup_template(markup, template_vars, template_env_options)).replace('"', '"').replace('\n', '') + ).convert(_markup_template(markup, template_vars, template_env_options)).replace('"', '"') def color_box( diff --git a/st3/mdpopups/version.py b/st3/mdpopups/version.py index 2dd79ac..d41c79c 100644 --- a/st3/mdpopups/version.py +++ b/st3/mdpopups/version.py @@ -1,6 +1,6 @@ """Version.""" -_version_info = (3, 7, 4) +_version_info = (3, 7, 5) __version__ = '.'.join([str(x) for x in _version_info])