How to define grammar to capture block without end marker


I wrote myself a little package to add timestamp to a block of text / notes for Text File. I like to know how do I define the grammar to capture the content between the timestamp marker so that I can fold the text/note block i.e.:

== 2016/09/10 09:10:20 (AM) ==
some note for today,  learn to define grammar

== 2016/09/09 01:01:02 (PM) ==
built myself a note package plugin for Atom.



It’s not quite that easy (there’s a whole package for folding markdown). You have two options as I see it:

  1. Separate the notes with a blank line or some character. Then you can use a regex to search for it.
  2. Copy the markdown-folder code and change the matcher to look for your style of headers.