Mike Gerwitz

Activist for User Freedom

aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Gerwitz <mike.gerwitz@rtspecialty.com>2018-01-25 16:16:34 -0500
committerMike Gerwitz <mike.gerwitz@rtspecialty.com>2018-09-11 09:30:52 -0400
commitc2f074f269fde3519f318e18615b92ea9511ef64 (patch)
treea2270fed169f630924b01a08d59b1cd7e9e860a0
parentb3117e7c550a7923714807298965e7f5e2ce5c88 (diff)
downloadtame-c2f074f269fde3519f318e18615b92ea9511ef64.tar.gz
tame-c2f074f269fde3519f318e18615b92ea9511ef64.tar.bz2
tame-c2f074f269fde3519f318e18615b92ea9511ef64.zip
[BC BREAK] _todo_: No value by default and output warning
* base.xml (_todo): Do not output a value by default. Output warning with `@desc@'. [@hide@]: Remove parameter. [@value@, @index@]: Add parameters.
-rw-r--r--core/base.xml37
1 files changed, 24 insertions, 13 deletions
diff --git a/core/base.xml b/core/base.xml
index 7f17785..2f3e5a2 100644
--- a/core/base.xml
+++ b/core/base.xml
@@ -135,14 +135,12 @@
<section title="Work-In-Progress">
- The templates in this section handle code that is
- a~work-in-progress; they should probably not be used in production
- code, since they indicate that something is incomplete or unused.
-
- \ref{_todo_} formalizes TODO items and \may~always yield a scalar
- integer~0, so it may be used within calculations. If yielding a
- constant value is not appropriate, it \may~also be stripped from
- the output entirely.
+ \ref{_todo_} formalizes TODO items and may optionally yield a
+ value~\tt{@value@} for use within calculations.%
+ \footnote{This is different than its previous behavior of always
+ yielding a scalar~$0$.}
+ All uses of the \ref{_todo_} template will produce a warning composed of
+ its description~\tt{@desc@}.
<template name="_todo_"
desc="Represents work that needs to be done">
@@ -150,13 +148,26 @@
<text>TODO</text>
</param>
- <param name="@hide@" desc="Whether to hide content by stripping
- it entriely from the output" />
+ <param name="@value@" desc="Placeholder value" />
+ <param name="@index@" desc="Placeholder value index">
+ <text></text>
+ </param>
- <unless name="@hide@">
- <c:const value="0"
- desc="TODO: {@desc@}" />
+ <unless name="@value@">
+ <unless name="@index@" eq="">
+ <error>Using @index@ without @value@</error>
+ </unless>
</unless>
+
+
+ <warning>
+ TODO: <param-value name="@desc@" />
+ </warning>
+
+
+ <if name="@value@">
+ <c:value-of name="@value@" index="@index@" />
+ </if>
</template>