diff options
author | the lemons <citrons@mondecitronne.com> | 2022-02-05 16:01:27 -0600 |
---|---|---|
committer | the lemons <citrons@mondecitronne.com> | 2022-02-05 16:01:27 -0600 |
commit | 3ca1a0f4f5088d8db2794910652cd4610a2e2230 (patch) | |
tree | 829995f428d94571ffd56fbd37547f9fceaeb15b | |
parent | eb2175a2cdb9464a6052407f453ac0628bf60957 (diff) |
case-insensitive backlinks
-rwxr-xr-x | zzcxz.cgi | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -140,15 +140,16 @@ local not_found = function() end local function parse_directive(line, directives) - local directive, args = line:match "^#([A-Z]+)%s*(.-)\n?$" + local directive, args = line:match "^#([A-Za-z]+)%s*(.-)\n?$" + directive = directive and directive:lower() if not directive then return - elseif directive == "BACKLINK" then + elseif directive == "backlink" then local page, action = args:match "^(%w%w%w%w%w)%s+(.+)$" if not page then return end directives.backlinks = directives.backlinks or {} table.insert(directives.backlinks, {page = page, action = action}) - elseif directive == "DEADEND" then + elseif directive == "deadend" then directives.deadend = true else return |