facelessuser / MarkdownPreview

Markdown preview and build plugin for Sublime Text https://facelessuser.github.io/MarkdownPreview/
Other
402 stars 53 forks source link

Fix Lowering of Front Matter Meta Data #147

Closed RoyiAvital closed 2 years ago

RoyiAvital commented 2 years ago

As shown in https://github.com/facelessuser/MarkdownPreview/discussions/146, it is needed that the fields defined in front matter (Meta data related only) will be lowered before processed.

An example for reference:

---
# Meta Data
Title: Some Title
Summary: Some Details
Author:
    - My Name
---
facelessuser commented 2 years ago

As only title is handled special, we will treat title as case insensitive. What this means though is that if we receive multiple entries with different casing: title, Title, TITLE, etc., the last one will be what resolves to as a title.

Browsers already treat other metadata as generally case insensitive, so there is no need for us to handle others special. If a user doesn't want duplicate entries, they should use consistence casing.