Changes
Use new Lua string.sub logic (index is 1-based instead of 0-based)
<span class=plainlinks>[//gerrit.wikimedia.org/r/#/q/{{urlencode:{{{1|example}}}}},n,z <!--
Shorten hashes to 7 characters for display.
Needs the strlen check first because str_sub will repeat otherwise.
-->{{#ifexpr: {{strlen|{{{1|example}}}}} > 7
| git #{{str sub|{{{1|example}}}|1|8}}
| git #{{{1|example}}}
}}]</span><noinclude>
{{documentation}}
</noinclude>
Shorten hashes to 7 characters for display.
Needs the strlen check first because str_sub will repeat otherwise.
-->{{#ifexpr: {{strlen|{{{1|example}}}}} > 7
| git #{{str sub|{{{1|example}}}|1|8}}
| git #{{{1|example}}}
}}]</span><noinclude>
{{documentation}}
</noinclude>