I want to paste in an error message and make it monospaced and surrounded by a gray block. In the old editor, we did this with "{noformat}" or "{{ }}" but those don't work anymore. The formatting/markdown guide for the new editor says to use single quotes (`) around the text, which works for a single line of text, but when I paste in a large block like an error message or stacktrace, it does nothing. Here's an example of what I want to happen, which this editor ironically supports:
Exception in thread "main" java.lang.NullPointerException
at com.example.myproject.Book.getTitle(Book.java:16)
at com.example.myproject.Author.getBookTitles(Author.java:25)
at com.example.myproject.Bootstrap.main(Bootstrap.java:14)
But in the new Jira editor, if I choose "insert code block" it numbers the lines and then doesn't respect the line breaks. If I use "code" from the formatting menu, it respects line breaks but puts white space between each line:
Why doesn't the single-quote option work to monospace a multi-line plain text snippet?
Hello @Mary Gilligan ,
The behavior you described is the intended behavior in the rich text formatting in the new Jira issue view and is covered in more detail here:
The Code Block macro would be the one to use for pasting items like a stack trace to have a full block of data, where the single tic formatting `text` is for monospaced values where you would like to insert a portion of an error inline with other text vs a separated block.
The Code Block also does include the line numbers and there is not an option to turn this off at this time. I created the following Feature request to track interest in an option to toggle the line numbers on or off in the macro setting for the new issue view, please make sure to add a vote as covered in the "Implementation of New Features Policy" as well as dropping a comment on the request if you have any additional feedback:
Regards,
Earl
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.