diff options
author | Yorhel <git@yorhel.nl> | 2020-03-03 11:58:37 +0100 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2020-03-03 11:58:37 +0100 |
commit | 47b15c59ecfc80c3d35509039d6cdd41af939a0f (patch) | |
tree | 904d30290b55e45b985c3e09082aa35b6ea290c3 /lib/VNWeb/Elm.pm | |
parent | 16ad7062563fc6d41dedb17857554c4b61617786 (diff) |
Lib.ExtLinks: Don't hide site list + add expandable list of supported URL formats
Diffstat (limited to 'lib/VNWeb/Elm.pm')
-rw-r--r-- | lib/VNWeb/Elm.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/VNWeb/Elm.pm b/lib/VNWeb/Elm.pm index 935f8334..1500e80b 100644 --- a/lib/VNWeb/Elm.pm +++ b/lib/VNWeb/Elm.pm @@ -339,6 +339,7 @@ sub write_extlinks { , links : a -> List String , del : Int -> a -> a , add : String -> a -> a + , patt : List String } reg r = Maybe.withDefault Regex.never (Regex.fromStringWith {caseInsensitive=True, multiline=False} r) @@ -364,7 +365,8 @@ sub write_extlinks { 'multi = '.($l->{multi}?'True':'False'), 'links = '.sprintf('(\m -> l%s%s m.%s)', $l->{int}?'i':'s', $l->{multi}?'m':'', $l->{id}), 'del = (\i m -> { m | '.$l->{id}.' = '.($l->{multi} ? "delidx i m.$l->{id}" : $l->{default}).' })', - 'add = (\v m -> { m | '.$l->{id}.' = '.($l->{multi} ? "m.$l->{id} ++ [$addval]" : $addval).' })' + 'add = (\v m -> { m | '.$l->{id}.' = '.($l->{multi} ? "m.$l->{id} ++ [$addval]" : $addval).' })', + 'patt = ['.join(', ', map string($_), $l->{pattern}->@*).']' )."\n }"; } @links; |