Skip to content

Commit

Permalink
Implement R code highlight (#5102)
Browse files Browse the repository at this point in the history
* Initial implement code highlight

* using local js src

* Code highlighting in help docs

* style changes

* Fix code highlight in dark mode
  • Loading branch information
shun2wang authored Jun 13, 2023
1 parent 965dd04 commit 999863b
Show file tree
Hide file tree
Showing 12 changed files with 4,081 additions and 1,144 deletions.
9 changes: 9 additions & 0 deletions Desktop/html/css/darkTheme-jasp.css
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,15 @@ div.jasp-image-image.no-data.error {
background-color: #555
}

/* to fix code highlight in dark theme*/
.jasp-rsyntax-container .hljs {
background: #555;
color: #FFFFFF;
}
.jasp-rsyntax-container .hljs-string {
color: #bd93f9;
}


/* Track */
::-webkit-scrollbar-track {
Expand Down
9 changes: 9 additions & 0 deletions Desktop/html/css/highlight-default.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Desktop/html/css/lightTheme-jasp.css
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ div.jasp-image-image.no-data.error {
}

.jasp-rsyntax-container {
background-color: rgb(235, 235, 235);
background-color: #f3f3f3;
}

/* Track */
Expand Down
1 change: 1 addition & 0 deletions Desktop/html/css/quill.snow.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/*!
*
* Quill Editor v1.3.1
* https://quilljs.com/
* Copyright (c) 2014, Jason Chen
Expand Down
3 changes: 3 additions & 0 deletions Desktop/html/index-jasp.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<link rel="stylesheet" href="css/jasp.css" type="text/css"/>
<link rel="stylesheet" href="css/lightTheme-jasp.css" type="text/css" id="style"/>
<link rel="stylesheet" href="css/printing.css" type="text/css" />
<link rel="stylesheet" href="css/highlight-default.min.css" type="text/css" />

<script type="text/javascript" > var insideJASP = true; </script>

Expand All @@ -20,6 +21,8 @@
<script type="text/javascript" src="js/underscore-min.js"> </script>
<script type="text/javascript" src="js/backbone-1.1.2.js"> </script>
<script type="text/javascript" src="js/etch.js"> </script>
<script type="text/javascript" src="js/highlight.min.js"> </script>
<script type="text/javascript" src="js/highlight-r.min.js"> </script>
<script type="text/javascript" src="js/quill.js"> </script>
<script type="text/javascript" src="js/mrkdwn.js"> </script>
<script type="text/javascript" src="js/jaspwidgets.js"> </script>
Expand Down
5 changes: 4 additions & 1 deletion Desktop/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,16 @@
<link rel="stylesheet" href="css/jasp.css" type="text/css"/>
<link rel="stylesheet" href="css/lightTheme-jasp.css" type="text/css" id="style"/>
<link rel="stylesheet" href="css/printing.css" type="text/css" />

<link rel="stylesheet" href="css/highlight-default.min.css" type="text/css" />

<script type="text/javascript" > var insideJASP = false; </script>

<script type="text/javascript" src="js/jquery-1.9.1.js"> </script>
<script type="text/javascript" src="js/jquery-ui-1.10.1.custom.js"> </script>
<script type="text/javascript" src="js/underscore-min.js"> </script>
<script type="text/javascript" src="js/backbone-1.1.2.js"> </script>
<script type="text/javascript" src="js/highlight.min.js"> </script>
<script type="text/javascript" src="js/highlight-r.min.js"> </script>
<script type="text/javascript" src="js/mrkdwn.js"> </script>
<script type="text/javascript" src="js/jaspwidgets.js"> </script>
<script type="text/javascript" src="js/object.js"> </script>
Expand Down
27 changes: 27 additions & 0 deletions Desktop/html/js/highlight-r.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 999863b

Please sign in to comment.