mirror of
https://gitlab.com/octtspacc/OcttKB
synced 2025-06-06 00:29:12 +02:00
OcttKB Cross-Repo Sync (HTML to Raw)
This commit is contained in:
@ -0,0 +1,36 @@
|
||||
tags: $:/tags/Macro
|
||||
title: $:/plugins/kookma/refnotes/macros/find
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
\define find(text, begin, end, output:"simple", mode:"all")
|
||||
<$vars
|
||||
fulltext=<<__text__>>
|
||||
start=<<__begin__>>
|
||||
stop=<<__end__>>
|
||||
output-macro=<<__output__>>
|
||||
>
|
||||
<$list variable=p1 filter="[<fulltext>splitbefore<start>]">
|
||||
<$list variable=p2 filter="[<fulltext>removeprefix<p1>]">
|
||||
<$list variable=p3 filter="[<p2>splitbefore<stop>removesuffix<stop>]">
|
||||
<$macrocall $name=<<output-macro>> p=<<p3>> />
|
||||
<$reveal type="match" text="all" default=<<__mode__>> >
|
||||
<$macrocall $name="find"
|
||||
text={{{[<p2>removeprefix<p3>removeprefix<stop>]}}}
|
||||
begin=<<start>>
|
||||
end=<<stop>>
|
||||
output=<<output-macro>>
|
||||
/>
|
||||
</$reveal>
|
||||
</$list>
|
||||
</$list>
|
||||
</$list>
|
||||
</$vars>
|
||||
\end
|
||||
|
||||
\define simple(p)
|
||||
<$text text=<<__p__>> />
|
||||
\end
|
||||
|
||||
\define simple-list(p)
|
||||
<li><$text text=<<__p__>>/></li>
|
||||
\end
|
Reference in New Issue
Block a user