JDK-8200665 : Ensemble: Update SyntaxHighlighter to version 4.0.1
  • Type: Bug
  • Component: javafx
  • Sub-Component: samples
  • Affected Version: 8,10,openjfx11
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2018-04-03
  • Updated: 2020-01-31
  • Resolved: 2019-01-10
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8 Other
8u211Fixed openjfx12Fixed
Description
We currently use SyntaxHighlighter version 3.0.83 in the Ensemble demo. We should update to the latest stable version of SyntaxHighlighter, which is 4.0.1
Comments
Changeset: 8843f890e66e Author: kcr Date: 2019-01-10 08:41 -0800 URL: http://hg.openjdk.java.net/openjfx/jfx-dev/rt/rev/8843f890e66e 8200665: Ensemble: Update SyntaxHighlighter to version 4.0.1 Reviewed-by: arapte
10-01-2019

The change looks good to me. +1
10-01-2019

Webrev: http://cr.openjdk.java.net/~kcr/8200665/webrev.00/ The replaces the old 3.0.83 version of SyntaxHighlighter with the latest, 4.0.1 version. The main changes are: 1. The v4.0.1 build generates a combined "syntaxhighlighter.js" file as its output, including the brushes (I built it only with the "java" brush). This replaces the separate shCore.js and shBrushJava.js files from the older version. It is completely different in structure from the 3.0.83 version, so there was no value in preserving history (so I just "hg rm"ed the previous two files and "hg add"ed the new one). 2. The generated css file for the default theme is largely the same. I renamed it from shCoreDefault.css to theme.css to match the new build structure (using "hg mv" to preserve the history), and applied all of our local styling changes (mainly the background color). 3. I made the corresponding logic changes in SourceTab.java for the combined / renamed files. Also, there is no more 'SyntaxHighlighter.all()' function to enable it, so I removed the call.
04-01-2019

It seems that SyntaxHighlighter version 3.0.90 does not work. A simple web page fails to show highlighting with all browsers.
03-08-2018

This may be as simple as upgrading our copies of shCore.js and shBrushJava.js from the v3.0.90 release. Note that the version of shCore.js that is checked into our repo has been minified so there will be no way to directly compare the diffs. Note also that they no longer provide shCoreDefault.css in their source repo nor build it as part of the distribution. We will either need to keep the old css file or generate the new one (which requires additional build tools), and then apply our minor changes to the default colors. The former will be easier, but we wouldn't pick up any differences that there may be in the css files (which will only be important if they added new attributes in the JS files). Ensemble use SyntaxHighlighter to display source code for samples via WebView, so testing will be limited to that.
03-04-2018