summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoshtriplett <joshtriplett@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2007-04-06 07:31:19 +0000
committerjoshtriplett <joshtriplett@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2007-04-06 07:31:19 +0000
commite0b85a7c92e15ffed61670166e10f18bacbd43db (patch)
tree1d84ed8d9d79fe35efe33cbe08b7c357d4607d7f
parenta946f9bf91600fb23697fc0d926b630e64082f87 (diff)
Suggest a simpler mechanism than regexes, to avoid the potential exploits caused by exposing regexes to web edits. Rename proposed debchangelog shortcut to debcl.
-rw-r--r--doc/todo/simple_text_parsing_or_regex_in_template_or_shortcut.mdwn11
1 files changed, 10 insertions, 1 deletions
diff --git a/doc/todo/simple_text_parsing_or_regex_in_template_or_shortcut.mdwn b/doc/todo/simple_text_parsing_or_regex_in_template_or_shortcut.mdwn
index 0f8badae8..7b3dbbd55 100644
--- a/doc/todo/simple_text_parsing_or_regex_in_template_or_shortcut.mdwn
+++ b/doc/todo/simple_text_parsing_or_regex_in_template_or_shortcut.mdwn
@@ -3,7 +3,7 @@ of very simple text parsing or regex application, to make it possible to write
shortcuts like these:
[[mmlist listname@lists.example.org]] -> <listname@example.org> ([mailman page] (http://lists.example.org/mailman/listinfo/listname)
- [[debchangelog packagename]] -> [packagename changelog](http://packages.debian.org/changelogs/pool/main/p/packagename/current/changelog)
+ [[debcl packagename]] -> [packagename changelog](http://packages.debian.org/changelogs/pool/main/p/packagename/current/changelog)
For shortcut definitions, a `match` parameter could supply a regex, and then the `url` and `desc` parameters could make use of the named or numbered groups from the match.
@@ -21,3 +21,12 @@ special-purpose plugins. It should be very simple to write plugins for the
above two examples, that look identical to the user as what you described.
--[[Joey]]
+
+Fair enough. I only proposed regexes for the purposes of generality.
+
+That said, some simple text substitution mechanisms might handle many of these
+cases without the need for a specialized plugin beyond [[plugins/shortcut]].
+For instance, substring extraction would suffice for the `debcl` shortcut, and
+something like a split function would work for the `mmlist` shortcut.
+
+--[[JoshTriplett]]