Skip to content

Instantly share code, notes, and snippets.

@sparr
Last active January 3, 2016 04:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sparr/8409141 to your computer and use it in GitHub Desktop.
Save sparr/8409141 to your computer and use it in GitHub Desktop.
depluralize mediawiki template parameter
{{#sub:{{lc: {{{1}}} }}|0|-3}}{{#ifeq:
{{#sub:
{{lc: {{{1}}} }}|
-3
}}|
men|
man|
{{#ifeq:
{{#sub:
{{lc: {{{1}}} }}|
-3
}}|
ses|
s|
{{#ifeq:
{{#sub:
{{lc: {{{1}}} }}|
-3
}}|
ves|
f|
{{#ifeq:
{{#sub:
{{lc: {{{1}}} }}|
-1
}}|
s|
{{#sub:
{{lc: {{{1}}} }}|
-2
}}|
{{#sub:
{{lc: {{{1}}} }}|
-3
}}
}}
}}
}}
}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment