From ce5f936136decde999cb70799efa6ff52d82ee41 Mon Sep 17 00:00:00 2001 From: Brett Terpstra Date: Thu, 21 Dec 2023 08:27:15 -0600 Subject: [PATCH 1/2] image handling was truncating footnotes - FIXED: Image fix truncating footnotes --- lib/mdless/console.rb | 2 +- test/Byword.md | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/mdless/console.rb b/lib/mdless/console.rb index c6e8934..0c40bea 100644 --- a/lib/mdless/console.rb +++ b/lib/mdless/console.rb @@ -832,7 +832,7 @@ def mmd_metadata_replace(input) end def fix_image_attributes(input) - input.gsub(/^( {0,3}\[.*?\]: *\S+) +([^"].*?)$/, '\1') + input.gsub(/^( {0,3}\[[^^].*?\]: *\S+) +([^"].*?)$/, '\1') end def preprocess(input) diff --git a/test/Byword.md b/test/Byword.md index 6192c1b..46cbcc9 100644 --- a/test/Byword.md +++ b/test/Byword.md @@ -111,9 +111,11 @@ In the vast majority of times, you will be using Markdown for its *raison d'ê [img-export]: img/export.png "Export options" -* Copy the HTML output directly to your clipboard -- so you can conveniently paste it into your favorite HTML editor[^fn-export]; +* Copy the HTML output directly to[^test] your clipboard -- so you can conveniently paste it into your favorite HTML editor[^fn-export]; * Export to a file. +[^test]: This is a little test. + [^fn-export]: When copying to clipboard, **Byword** will only place the equivalent of the `body` tag contents. On the other hand, when exporting to a file, a complete HTML file will be generated. We know how much you love **Byword**'s aesthetics so we even added a little bonus to the option of exporting to a file. From 70e62c6a4e6db8f9786f7ae044863d5454e5a5a7 Mon Sep 17 00:00:00 2001 From: Brett Terpstra Date: Thu, 21 Dec 2023 08:27:31 -0600 Subject: [PATCH 2/2] 2.1.41 #### FIXED - Image fix truncating footnotes --- lib/mdless/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mdless/version.rb b/lib/mdless/version.rb index 934b6b4..8608b13 100644 --- a/lib/mdless/version.rb +++ b/lib/mdless/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module CLIMarkdown - VERSION = '2.1.40' + VERSION = '2.1.41' end