Skip to content
This repository has been archived by the owner on Aug 11, 2021. It is now read-only.

Commit

Permalink
feat: allow both text and links to be provided in an array of links (#13
Browse files Browse the repository at this point in the history
)
  • Loading branch information
xizhao authored and bcoe committed May 19, 2016
1 parent 0e7236c commit 5dd14e3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion annotation.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@
{{#hasKey this "_link"}}
{{#isArray this}}
{{#each this}}
<a target="_blank" href="{{{url}}}">{{text}}</a>{{#unless @last}},{{/unless}}
{{#if url}}
{{text}}
{{else}}
<a target="_blank" href="{{{url}}}">{{text}}</a>
{{/if}}
{{#unless @last}},{{/unless}}
{{/each}}
{{else}}
<a href="{{{url}}}">{{text}}</a>
Expand Down

0 comments on commit 5dd14e3

Please sign in to comment.