yogthos / markdown-clj

Markdown parser in Clojure
Eclipse Public License 1.0
540 stars 120 forks source link

Metadata parsers return consumed linecount #177

Closed Oddsor closed 2 years ago

Oddsor commented 2 years ago

When the metadata parsers return the number of lines consumed, we can more easily figure out the correct offset when parsing the rest of the document.

This fixes an issue where the yaml metadata parser did not handle empty lines and required a trailing emptyline after the ending delimiter

Oddsor commented 2 years ago

This change "accidentally" also changes the behaviour of the wikimeta-parser so that this becomes valid (no empty line). Not sure if this is problematic or not 🤔

Title:   My Document
Summary: A brief description of my document.
Authors: Justin May
         Spooky Mulder
         End Line At End  
Date:    October 31, 2015
blank-value:
base_url: http://example.com
# The Document
yogthos commented 2 years ago

Thanks for the fix, I just pushed out 1.10.8 to Clojars with the updates.