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

Fix since-version docs macro to make extra information optional

This commit is contained in:
Jeremy Ruston 2024-08-27 15:42:13 +01:00
parent 98cd4a09b4
commit fb9459a0dd
3 changed files with 11 additions and 9 deletions

View File

@ -9,6 +9,6 @@ type: text/vnd.tiddlywiki
<$link to={{{ [<__version__>addprefix[Release ]] }}} class="doc-from-version">{{$:/core/images/warning}} New in: <$text text=<<__version__>>/></$link> <$link to={{{ [<__version__>addprefix[Release ]] }}} class="doc-from-version">{{$:/core/images/warning}} New in: <$text text=<<__version__>>/></$link>
\end \end
\define .deprecated-since(version, superseded:"TODO-Link") \define .deprecated-since(version, superseded:"")
<$link to="Deprecated - What does it mean" class="doc-deprecated-version tc-btn-invisible">{{$:/core/images/warning}} Deprecated since: <$text text=<<__version__>>/></$link> (see <$link to=<<__superseded__>>><$text text=<<__superseded__>>/></$link>) <$link to="Deprecated - What does it mean" class="doc-deprecated-version tc-btn-invisible">{{$:/core/images/warning}} Deprecated from v<$text text=<<__version__>>/></$link> <%if [<__superseded__>else[]!match[]] %>(see <$link to=<<__superseded__>>><$text text=<<__superseded__>>/></$link>)<%endif%>
\end \end

View File

@ -9,7 +9,7 @@ type: text/vnd.tiddlywiki
\end \end
\define .deprecated-since(version, superseded:"TODO-Link") \define .deprecated-since(version, superseded:"TODO-Link")
<$button to="Deprecated - What does it mean" class="doc-deprecated-version tc-btn-invisible">{{$:/core/images/warning}} Obsolète depuis<<:>> $version$ </$button>. Utilisez [[$superseded$]] à la place <$button to="Deprecated - What does it mean" class="doc-deprecated-version tc-btn-invisible">{{$:/core/images/warning}} Obsolète depuis<<:>> $version$ </$button>. <%if [<__superseded__>else[]!match[]] %>Utilisez [[$superseded$]] à la place<%endif%>
\end \end
<pre><$view field="text"/></pre> <pre><$view field="text"/></pre>

View File

@ -26,13 +26,15 @@ type: text/vnd.tiddlywiki
<% endif %> <% endif %>
\end \end
\procedure .deprecated-since(version, superseded:"TODO-Link") \procedure .deprecated-since(version, superseded:"")
<$link to="Deprecated - What does it mean" class="doc-deprecated-version tc-btn-invisible"> <$link to="Deprecated - What does it mean" class="doc-deprecated-version tc-btn-invisible">
{{$:/core/images/warning}} {{$:/core/images/warning}}
<span class="tc-tiny-gap">Deprecated since:</span> <span class="tc-tiny-gap">Deprecated from </span>
<$text text=<<version>>/> v<$text text=<<version>>/>
</$link> </$link>
<%if [<superseded>else[]!match[]] %>
<span class="tc-tiny-gap-left"> <span class="tc-tiny-gap-left">
(see <$link class="tc-tiny-gap-left" to=<<superseded>>><$text text=<<superseded>>/></$link>) (see <$link class="tc-tiny-gap-left" to=<<superseded>>><$text text=<<superseded>>/></$link>)
</span> </span>
<%endif%>
\end \end