Title: Bug when selecting Java + Show Line Numbers
Last modified: October 15, 2020

---

# Bug when selecting Java + Show Line Numbers

 *  Resolved [Mak](https://wordpress.org/support/users/makolyte/)
 * (@makolyte)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/bug-when-selecting-java-show-line-numbers/)
 * I ran into a bug when setting the language to Java and showing line numbers.
 * I put this in the code block:
    public QuoteEntity(@NotNull String text)
 * It gets rendered like this:
    1| public QuoteEntity( 1| [@notnull](https://wordpress.org/support/users/notnull/)
   String text)
 * Options:
    Language=Java Show Line Numbers = true

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/bug-when-selecting-java-show-line-numbers/#post-13539497)
 * I’m not seeing that.
 * I see this:
 * > ![](https://i0.wp.com/cldup.com/0AYczRbjey.png?ssl=1)
 * The editor is configured as follows:
 * > ![](https://i0.wp.com/cldup.com/cJ-D_hM32p.png?ssl=1)
 *  Thread Starter [Mak](https://wordpress.org/support/users/makolyte/)
 * (@makolyte)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/bug-when-selecting-java-show-line-numbers/#post-13540151)
 * The problem only seems to happen when the opening ( and closing ) aren’t on the
   same line. Oops, sorry, I put the wrong code in the original post.
 * The simplest way I could reproduce this is with the following:
    public QuoteEntity()
 * I can work around this problem by rewriting my code to always have ( ) on the
   same line and then turning on Wrap Lines.
 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/bug-when-selecting-java-show-line-numbers/#post-13540174)
 * OK, glad you found a workaround. I filed an issue to fix this in the future: 
   [https://github.com/westonruter/syntax-highlighting-code-block/issues/193](https://github.com/westonruter/syntax-highlighting-code-block/issues/193)

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Bug when selecting Java + Show Line Numbers’ is closed to new replies.

 * ![](https://ps.w.org/syntax-highlighting-code-block/assets/icon.svg?rev=3406002)
 * [Syntax-highlighting Code Block (with Server-side Rendering)](https://wordpress.org/plugins/syntax-highlighting-code-block/)
 * [Support Threads](https://wordpress.org/support/plugin/syntax-highlighting-code-block/)
 * [Active Topics](https://wordpress.org/support/plugin/syntax-highlighting-code-block/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/syntax-highlighting-code-block/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/syntax-highlighting-code-block/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * Last activity: [5 years, 7 months ago](https://wordpress.org/support/topic/bug-when-selecting-java-show-line-numbers/#post-13540174)
 * Status: resolved