tbh1 / sublime-notes

A syntax designed to bring syntax highlighting to every day note taking.
76 stars 18 forks source link

Improve warning/critical match expression and update ReadMe #48

Open osheas1atwit opened 7 months ago

osheas1atwit commented 7 months ago

This fork has two purposes:

  1. Improve the match expression for the "super important" emphasis.
  2. Update the README so that the headers are rendered in Github.

For Purpose 1:

In the original documentation, there is an example of this where text between two exclamation points is highlighted, such as:

!! HIGHLIGHTED TEXT !!

I found that in practice, this does not accurately reflect the regex used to detect the super important emphasis. The original REGEX highlights every character on a line found after a single exclamation point, which makes organic note-taking look strange with the highlighting occurring seemingly at random places.

I much preferred how the example screenshot demonstrates this feature, so I tuned the regex to behave as such. Now, it will highlight any and all text (across multiple lines) ONLY between unique sets of two exclamation points.

For Purpose 2:

The current README has markdown headers, but they aren't properly formatted. As of now, the #'s are not separated from the text with a space, causing the headers to be rendered as plaintext. By adding that space, the README becomes a bit more readable!