Skip to content

Commit

Permalink
image handling was truncating footnotes
Browse files Browse the repository at this point in the history
- FIXED: Image fix truncating footnotes
  • Loading branch information
ttscoff committed Dec 21, 2023
1 parent 87c23b6 commit ce5f936
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/mdless/console.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 3 additions & 1 deletion test/Byword.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit ce5f936

Please sign in to comment.