Standardise whitespace in conditional shortcut syntax (#8583)

This commit is contained in:
Jeremy Ruston
2024-09-02 16:51:15 +01:00
committed by GitHub
parent 842605d28e
commit 69637640d2
23 changed files with 85 additions and 85 deletions
@@ -6,7 +6,7 @@ module-type: wikirule
Conditional shortcut syntax
```
This is a <% if [{something}] %>Elephant<% elseif [{else}] %>Pelican<% else %>Crocodile<% endif %>
This is a <%if [{something}] %>Elephant<%elseif [{else}] %>Pelican<%else%>Crocodile<%endif%>
```
\*/
@@ -27,7 +27,7 @@ exports.init = function(parser) {
};
exports.findNextMatch = function(startPos) {
// Look for the next <% if shortcut
// Look for the next <%if shortcut
this.matchRegExp.lastIndex = startPos;
this.match = this.matchRegExp.exec(this.parser.source);
// If not found then return no match
+3 -3
View File
@@ -83,11 +83,11 @@ first-search-filter: [all[shadows]search<userInput>sort[title]limit[250]] -[[$:/
<div class="tc-search-results">
<% if [<resultCount>match[0]] %>
<%if [<resultCount>match[0]] %>
{{$:/language/Search/Matches/NoMatch}}
<% else %>
<%else%>
<<lingo Shadows/Matches>>
<% endif %>
<%endif%>
<$list filter="[all[shadows]search{$:/temp/advancedsearch}sort[title]limit[250]] -[[$:/temp/advancedsearch]] -[[$:/temp/advancedsearch/input]]">
<span class={{{[<currentTiddler>addsuffix[-primaryList]] -[[$:/temp/advancedsearch/selected-item]get[text]] +[then[]else[tc-list-item-selected]] }}}>
+3 -3
View File
@@ -82,11 +82,11 @@ first-search-filter: [is[system]search<userInput>sort[title]limit[250]] -[[$:/te
<div class="tc-search-results">
<% if [<resultCount>match[0]] %>
<%if [<resultCount>match[0]] %>
{{$:/language/Search/Matches/NoMatch}}
<% else %>
<%else%>
<<lingo System/Matches>>
<% endif %>
<%endif%>
<$list filter="[is[system]search{$:/temp/advancedsearch}sort[title]limit[250]] -[[$:/temp/advancedsearch]] -[[$:/temp/advancedsearch/input]] -[[$:/temp/advancedsearch/selected-item]]">
<span class={{{[<currentTiddler>addsuffix[-primaryList]] -[[$:/temp/advancedsearch/selected-item]get[text]] +[then[]else[tc-list-item-selected]] }}}>
+10 -10
View File
@@ -31,11 +31,11 @@ second-search-filter: [subfilter<tagListFilter>is[system]search:title<userInput>
\procedure add-tag-actions()
<$let tag=<<_tf.getTag>> >
<$action-listops $tiddler=<<saveTiddler>> $field=<<tagField>> $subfilter='+[toggle<tag>trim[]]'/>
<% if [<tag>] :intersection[<saveTiddler>get<tagField>enlist-input[]] %>
<%if [<tag>] :intersection[<saveTiddler>get<tagField>enlist-input[]] %>
<!-- tag has been removed - do nothing -->
<% else %>
<%else%>
<<actions>>
<% endif %>
<%endif%>
<<delete-tag-state-tiddlers>>
<$action-setfield $tiddler=<<refreshTitle>> text="yes"/>
</$let>
@@ -46,11 +46,11 @@ second-search-filter: [subfilter<tagListFilter>is[system]search:title<userInput>
The second ESC tries to close the "draft tiddler"
-->
\procedure clear-tags-actions-inner()
<% if [<storeTitle>has[text]] ~[<newTagNameTiddler>has[text]] %>
<%if [<storeTitle>has[text]] ~[<newTagNameTiddler>has[text]] %>
<<delete-tag-state-tiddlers>>
<% else %>
<%else%>
<<cancel-delete-tiddler-actions "cancel">>
<% endif %>
<%endif%>
\end
<!-- triggered by keyboard only -->
@@ -128,13 +128,13 @@ The second ESC tries to close the "draft tiddler"
>
{{$:/core/images/down-arrow}}
</$button>
<% if [<storeTitle>has[text]] %>
<%if [<storeTitle>has[text]] %>
<$button actions=<<delete-tag-state-tiddlers>> class="tc-btn-invisible tc-small-gap tc-btn-dropdown"
tooltip={{$:/language/EditTemplate/Tags/ClearInput/Hint}} aria-label={{$:/language/EditTemplate/Tags/ClearInput/Caption}}
>
{{$:/core/images/close-button}}
</$button>
<% endif %>
<%endif%>
<span class="tc-add-tag-button tc-small-gap-left">
<$let tag=<<_tf.getTag>>>
<$button set=<<newTagNameTiddler>> actions=<<add-button-actions>> >
@@ -144,13 +144,13 @@ The second ESC tries to close the "draft tiddler"
</span>
</div>
<div class="tc-block-dropdown-wrapper">
<% if [<tf.tagpicker-dropdown-id>has[text]] %>
<%if [<tf.tagpicker-dropdown-id>has[text]] %>
<div class="tc-block-dropdown tc-block-tags-dropdown">
<$macrocall $name="tag-picker-listTags" filter=<<nonSystemTagsFilter>> suffix="-primaryList" />
<hr>
<$macrocall $name="tag-picker-listTags" filter=<<systemTagsFilter>> suffix="-secondaryList" />
</div>
<% endif %>
<%endif%>
</div>
</div>
\end