Skip to content
This repository has been archived by the owner on Oct 26, 2022. It is now read-only.

Commit

Permalink
Add support for firstline parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
Siavash Safi committed Sep 15, 2017
1 parent c4f7137 commit a65da43
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main/java/com/catawiki/jira/prism/Code.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ public String execute(Map<String, Object> parameters, String body, RenderContext
case "title":
templateParams.put("title", (String) entry.getValue());
break;
case "firstline":
case "fl":
case "start":
templateParams.put("start", (String) entry.getValue());
break;
case "highlight":
case "hl":
templateParams.put("highlight", (String) entry.getValue());
Expand Down
2 changes: 2 additions & 0 deletions src/main/resources/soy/prism.soy
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* @param? language
* @param? title
* @param? linenumbers
* @param? start
* @param? wrap
* @param? highlight
* @param? commandline
Expand All @@ -17,6 +18,7 @@
{if $title} data-line-offset="-1.7" {/if}
{if $linenumbers} class="line-numbers" {/if}
{if $wrap} style="white-space: pre-wrap;" {/if}
{if $start } data-start="{$start}" {/if}
{if $highlight} data-line="{$highlight}" {/if}
{if $commandline} class="command-line" {/if}
{if $user} data-user="{$user}" {/if}
Expand Down

0 comments on commit a65da43

Please sign in to comment.