1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-23 01:57:19 +00:00

Fix exporting of tiddlers that begin and end with double quotes

This commit is contained in:
jeremy@jermolene.com 2021-03-23 09:27:16 +00:00
parent 8d763f7682
commit 226df2ad7d

View File

@ -6,25 +6,24 @@ $baseFilename$$(extension)$
\end \end
\define exportButton(exportFilter:"[!is[system]sort[title]]",lingoBase,baseFilename:"tiddlers") \define exportButton(exportFilter:"[!is[system]sort[title]]",lingoBase,baseFilename:"tiddlers")
<span class="tc-popup-keep"><$button popup=<<qualify "$:/state/popup/export">> tooltip={{$lingoBase$Hint}} aria-label={{$lingoBase$Caption}} class=<<tv-config-toolbar-class>> selectedClass="tc-selected"> <$vars hint={{{ [<__lingoBase__>addsuffix[Hint]get[text]] }}} caption={{{ [<__lingoBase__>addsuffix[Caption]get[text]] }}}>
<span class="tc-popup-keep"><$button popup=<<qualify "$:/state/popup/export">> tooltip=<<hint>> aria-label=<<caption>> class=<<tv-config-toolbar-class>> selectedClass="tc-selected">
<$list filter="[<tv-config-toolbar-icons>match[yes]]"> <$list filter="[<tv-config-toolbar-icons>match[yes]]">
{{$:/core/images/export-button}} {{$:/core/images/export-button}}
</$list> </$list>
<$list filter="[<tv-config-toolbar-text>match[yes]]"> <$list filter="[<tv-config-toolbar-text>match[yes]]">
<span class="tc-btn-text"><$text text={{$lingoBase$Caption}}/></span> <span class="tc-btn-text"><$text text=<<caption>>/></span>
</$list> </$list>
</$button></span><$reveal state=<<qualify "$:/state/popup/export">> type="popup" position="below" animate="yes"> </$button></span></$vars><$reveal state=<<qualify "$:/state/popup/export">> type="popup" position="below" animate="yes">
<div class="tc-drop-down"> <div class="tc-drop-down">
<$set name="count" value={{{ [subfilter<__exportFilter__>count[]] }}}> <$set name="count" value={{{ [subfilter<__exportFilter__>count[]] }}}>
<$list filter="[all[shadows+tiddlers]tag[$:/tags/Exporter]]"> <$list filter="[all[shadows+tiddlers]tag[$:/tags/Exporter]]">
<$list filter="[<currentTiddler>has[condition]subfilter{!!condition}limit[1]] ~[<currentTiddler>!has[condition]then[true]]" variable="ignore"> <$list filter="[<currentTiddler>has[condition]subfilter{!!condition}limit[1]] ~[<currentTiddler>!has[condition]then[true]]" variable="ignore">
<$set name="extension" value={{!!extension}}>
<$button class="tc-btn-invisible"> <$button class="tc-btn-invisible">
<$action-sendmessage $message="tm-download-file" $param=<<currentTiddler>> exportFilter=<<__exportFilter__>> filename=<<exportButtonFilename """$baseFilename$""">>/> <$action-sendmessage $message="tm-download-file" $param=<<currentTiddler>> exportFilter=<<__exportFilter__>> filename={{{ [<__baseFilename__>addsuffix{!!extension}] }}}/>
<$action-deletetiddler $tiddler=<<qualify "$:/state/popup/export">>/> <$action-deletetiddler $tiddler=<<qualify "$:/state/popup/export">>/>
<$transclude field="description"/> <$transclude field="description"/>
</$button> </$button>
</$set>
</$list> </$list>
</$list> </$list>
</$set> </$set>