exercism / DEPRECATED.v2-feedback

Please use https://github.com/exercism/exercism.io for reporting issues
13 stars 5 forks source link

Syntax highlight of java generics and lambdas #217

Closed FabienTregan closed 6 years ago

FabienTregan commented 6 years ago

When inserting some java with generic code, selecting the code then pressing the "code" button, things go fine avec the code syntex highlighted.

But then when you go on the preview tabpane, it get all messed up :

private Function<String[], String> x = null;

becomes

private Function<string string> x = null;
</string>

(coma is lost, String is lowercased)

and

private Function<String[], List<String>> x = x -> x;

becomes

private Function<string list>&gt; x = x -&gt; x;
</string>

The preview (worst) version is the one that gets in the comment. (Happened to me here)

iHiD commented 6 years ago

Could you raise an issue on Prism for this pls: https://github.com/PrismJS/prism/issues

NobbZ commented 6 years ago

Are you sure this is prism related and not our markdown renderer?

FabienTregan commented 6 years ago

I made a quick test with latest version of prism. The output is less wrong than what we get, but still incorrect.

I am opening an issue on prism, but before it is corrected, some mentors may send comments with unreadable code without noticing (we do not enforece pressing preview before sending the comment, but even then people tend to press prview without atually reading the preview :) ) So this is still an issue on our side.

FabienTregan commented 6 years ago

This piece os code is displayed correctly by prism :

<pre><code class="language-java">
    private Function&lt;String[], List&ltString>> x = x -> x;
</code></pre>

(you have to html escape the <s)

FabienTregan commented 6 years ago

when you click the "preview" tab, exercism.io/parse is called with parameter markdown:private+Function<String[],+List<String>>+x+=+x+->+x;+ , the response body is :

private Function<string list>&gt; x = x -&gt; x; 
</string>

The problems seems to be on the server side. I'm still not able to run the server on my (windows) computer to digg this.

kytrinyx commented 6 years ago

Closing. Imported to the https://github.com/exercism/exercism.io repository.