all repos — hastyscribe @ 1b17825197cfd3344f648b4ff52de45e82b9e090

A professional markdown compiler.

Allowing => for macro definitions.
h3rald h3rald@h3rald.com
Sun, 12 Mar 2017 13:18:39 +0100
commit

1b17825197cfd3344f648b4ff52de45e82b9e090

parent

f06926d8c9036e8b5c750a93def2578a981c02c1

2 files changed, 7 insertions(+), 6 deletions(-)

jump to
M doc/HastyScribe_UserGuide.htmdoc/HastyScribe_UserGuide.htm

@@ -4706,7 +4706,7 @@ </thead>

<tbody> <tr> <td><code>{{$timestamp}}</code> </td> -<td> 1489319929</td> +<td> 1489321116</td> </tr> <tr> <td><code>{{$date}}</code> </td>

@@ -4730,19 +4730,19 @@ <td> 3/12/17</td>

</tr> <tr> <td><code>{{$short-time}}</code> </td> -<td> 12:58 PM</td> +<td> 13:18 PM</td> </tr> <tr> <td><code>{{$short-time-24}}</code> </td> -<td> 12:58</td> +<td> 13:18</td> </tr> <tr> <td><code>{{$time}}</code> </td> -<td> 12:58:49 PM</td> +<td> 13:18:36 PM</td> </tr> <tr> <td><code>{{$time-24}}</code> </td> -<td> 12:58:49</td> +<td> 13:18:36</td> </tr> <tr> <td><code>{{$day}}</code> </td>
M hastyscribe.nimhastyscribe.nim

@@ -185,7 +185,8 @@ # Macro Usage:

# {#test||simple test} proc parse_macros(hs: var HastyScribe, document: string): string = let peg_macro_def = peg""" - definition <- '{#' \s* {id} \s* '->' {@} '#}' + definition <- '{#' \s* {id} \s* deftype {@} '#}' + deftype <- '->' / '=>' id <- [a-zA-Z0-9_-]+ """ let peg_macro_instance = peg"""