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
Install Atlassian Plugin SDK and run atlas-package
.
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 JS compile issues with Atlassian Plugin SDK.
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