Skip to content

Commit 96f555e

Browse files
committed
Clarified that => is preferred for defining macros.
1 parent 1b17825 commit 96f555e

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

doc/-syntax.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ In this case it will be possible to access the [product](class:kwd) and [product
8989

9090
If snippets are not enough, and you want to reuse chunks of _similar_ content, you can define substitution macros using the following syntax:
9191

92-
<code>\{#greet -> Hello, $1! Are you $2?#\}</code>
92+
<code>\{#greet => Hello, $1! Are you $2?#\}</code>
9393

9494
This defines a macro called [greet](class:kwd) that takes two parameters which will be substituted instead of [$1](class:kwd) and [$2](class:kwd). To use the macro, use the following syntax:
9595

@@ -101,6 +101,7 @@ This defines a macro called [greet](class:kwd) that takes two parameters which w
101101
> * Like snippets, macros can be multiline.
102102
> * Spaces and newline character are preseved ad the start and end of parameters.
103103
> * You can use snippets and fields within macros (but you cannot nest macros inside other macros).
104+
> * You can define macros using either [->](class:kwd) or [=>](class:kwd), although [=>](class:kwd) is preferred.
104105
105106
{@ -syntax-inline.md || 1 @}
106107

doc/HastyScribe_UserGuide.htm

+7-6
Original file line numberDiff line numberDiff line change
@@ -4706,7 +4706,7 @@ <h3>Fields<a href="#document-top" title="Go to top"></a></h3>
47064706
<tbody>
47074707
<tr>
47084708
<td><code>{{$timestamp}}</code> </td>
4709-
<td> 1489321116</td>
4709+
<td> 1489321436</td>
47104710
</tr>
47114711
<tr>
47124712
<td><code>{{$date}}</code> </td>
@@ -4730,19 +4730,19 @@ <h3>Fields<a href="#document-top" title="Go to top"></a></h3>
47304730
</tr>
47314731
<tr>
47324732
<td><code>{{$short-time}}</code> </td>
4733-
<td> 13:18 PM</td>
4733+
<td> 13:23 PM</td>
47344734
</tr>
47354735
<tr>
47364736
<td><code>{{$short-time-24}}</code> </td>
4737-
<td> 13:18</td>
4737+
<td> 13:23</td>
47384738
</tr>
47394739
<tr>
47404740
<td><code>{{$time}}</code> </td>
4741-
<td> 13:18:36 PM</td>
4741+
<td> 13:23:56 PM</td>
47424742
</tr>
47434743
<tr>
47444744
<td><code>{{$time-24}}</code> </td>
4745-
<td> 13:18:36</td>
4745+
<td> 13:23:56</td>
47464746
</tr>
47474747
<tr>
47484748
<td><code>{{$day}}</code> </td>
@@ -4803,7 +4803,7 @@ <h3>Macros<a href="#document-top" title="Go to top"></a></h3>
48034803

48044804
<p>If snippets are not enough, and you want to reuse chunks of <em>similar</em> content, you can define substitution macros using the following syntax:</p>
48054805

4806-
<p><code>{#greet -> Hello, $1! Are you $2?#}</code></p>
4806+
<p><code>{#greet => Hello, $1! Are you $2?#}</code></p>
48074807

48084808
<p>This defines a macro called <span class="kwd">greet</span> that takes two parameters which will be substituted instead of <span class="kwd">$1</span> and <span class="kwd">$2</span>. To use the macro, use the following syntax:</p>
48094809

@@ -4815,6 +4815,7 @@ <h3>Macros<a href="#document-top" title="Go to top"></a></h3>
48154815
<li>Like snippets, macros can be multiline.</li>
48164816
<li>Spaces and newline character are preseved ad the start and end of parameters.</li>
48174817
<li>You can use snippets and fields within macros (but you cannot nest macros inside other macros).</li>
4818+
<li>You can define macros using either <span class="kwd">-></span> or <span class="kwd">=></span>, although <span class="kwd">=></span> is preferred.</li>
48184819
</ul>
48194820
</div>
48204821

0 commit comments

Comments
 (0)