Skip to content

Instantly share code, notes, and snippets.

@britter
Created December 23, 2015 13:14
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 britter/ff30240693c8e25366ed to your computer and use it in GitHub Desktop.
Save britter/ff30240693c8e25366ed to your computer and use it in GitHub Desktop.
Using #strings to abbreviate the git commit hash
<a href="https://github.com"
th:href="#{git.commit.link}"
th:text="${#strings.substring('__#{git.commit.hash}__', 0, 7)}"
>1bb7244</a>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment