aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authors-ol <s+removethis@s-ol.nu>2022-03-23 23:18:31 +0000
committers-ol <s+removethis@s-ol.nu>2022-03-23 23:18:31 +0000
commita5fc2c9ee95e38c9aa5b2cb64bc84ea90e314558 (patch)
tree857bc7b826d9b6dd9a0f5995d6efa622c6a48d96
parentupdate shell.nix (diff)
downloadmmm-a5fc2c9ee95e38c9aa5b2cb64bc84ea90e314558.tar.gz
mmm-a5fc2c9ee95e38c9aa5b2cb64bc84ea90e314558.zip
support facet attribute in <mmm-link>
-rw-r--r--mmm/mmmfs/builtins.moon3
1 files changed, 2 insertions, 1 deletions
diff --git a/mmm/mmmfs/builtins.moon b/mmm/mmmfs/builtins.moon
index 8c751dd..9bff97a 100644
--- a/mmm/mmmfs/builtins.moon
+++ b/mmm/mmmfs/builtins.moon
@@ -87,7 +87,7 @@ converts = {
(html, fileder) =>
html = html\yieldable_gsub '<mmm%-link%s+(.-)>(.-)</mmm%-link>', (attrs, text) ->
text = nil if #text == 0
- path = ''
+ path, facet = '', ''
while attrs and attrs != ''
key, val, _attrs = attrs\match '^(%w+)="([^"]-)"%s*(.*)'
if not key
@@ -98,6 +98,7 @@ converts = {
switch key
when 'path' then path = val
+ when 'facet' then facet = val
else warn "unkown attribute '#{key}=\"#{val}\"' in <mmm-link>"
link_to path, text, fileder