Skip to content

Cannot use the word 'String' within double-quotes for Java #13

@dan-j

Description

@dan-j

I have the following text in my post:

[java]String str = "A String";[/java]

It renders the following:

String str = "A String"String";

It seems the above example is matching as a string and as a keyword. The HTML looks like the following:

<code data-enlighter-language="java" class="EnlighterJSRAW">String str = &quot;Inline String&quot;;</code>

And the DOM is being rendered:

<span class="beyondEnlighterJS EnlighterJS">
    <span class="kw2">String</span>
    <span class> str = </span>
    <span class="str">"Inline String"</span>
    <span class="kw2">String</span>
    <span class=>";</span>
</span>

I've also verified that the above behaviour occurs if the string is, "A void" (another java keyword).

Hope the above is enough information. It seems like keywords are still being searched even within quotes.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions