Prism is a {code}
macro plugin for Atlassian Jira.
- Client side syntax highlighting using Prism
- Support for many programming languages
- Line numbers
- Line highlighting
- Commandline with output support
- Whitespace normalization
Name | Version |
---|---|
JIRA | 7.2.0+ |
Service Desk | 3.2.0+ |
Install Atlassian Plugin SDK and run atlas-package
.
To run a test instance of JIRA, JIRA Software and Service Desk run the following command:
atlas-run
All versions are specified in pom.xml
.
To run specific version of the JIRA server and software either edit pom.xml
or pass the versions as commandline options:
atlas-run -v 7.11.0 -D jira.version=7.11.0 -D servicedesk.version=3.14.0
Important: Make sure to use a compatible servicedesk.version
, check compatible versions.
Multiple parameters can be specified by using |
as separator, some parameters can have one or more values separated by ,
:
{code:<param1>|<param2>=<value>|<param3>=<value1>,<value2>|...}
...
{code}
Default language is Ruby:
{code}
class Bar < Foo
def initialize(a)
@a = a
end
end
{code}
Syntax: <language>
as first parameter or language=<language>
or lang=<language>
{code:java}
public class Bar extends Foo {
private int a;
public Bar(int a) {
this.a = a;
}
}
{code}
Syntax: title=<title>
{code:title=prism.rb}
...
{code}
Syntax: linenumbers
or ln
{code:ln}
...
{code}
Syntax: start=<number>
or firstline=<number>
or fl=<number>
{code:ln|start=5}
...
{code}
Syntax: wrap
{code:ln|wrap}
...
{code}
Syntax: highlight=<line(s)>,<range>,...
or hl=<line(s)>,<range>,...
{code:hl=2,4-6}
...
{code}
Syntax: cmd=<user>@<host>[><output line(s),<ranges>,...]
or commandline=<user>@<host>[><output line(s),<ranges>,...]
{code:bash|cmd=siavash@localhost>2,5-30}
...
{code}
Visual editing in Rich Text Editor is not fully supported. While you don't have to disable Rich Text Editor in Jira, you cannot use the visual tab to do code editing.
This plugin uses a slightly modified version of Prism to fix minor bugs with line highlighting.
This plugin is released without any support, if you want to add a new feature or fix a bug feel free to submit a PR.
Also check this Jira Server issue regarding {code}
macro limitations and why this plugin was developed.
see PRIVACY.md