Skip to content

Commit

Permalink
Re-enable syntax highlighting in PolyglotWorkspace
Browse files Browse the repository at this point in the history
  • Loading branch information
fniephaus committed Jun 10, 2021
1 parent 51f0fe3 commit 2378981
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 6 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
private
privateStyle: aText
| languageId |
languageId := view model languageInfo getId.
(Polyglot isPermitted: 'ruby')
ifTrue: [ | rubyString |
rubyString := self rubyUnbox: aText asString withUnixLineEndings.
aText runs: ((self formatter format: ((self lexerFor: languageId) lex: rubyString))
asString copyReplaceAll: String lf with: '<br/>') asTextFromHtml runs ]
ifFalse: [
languageId = Polyglot languageIdSmalltalk
ifTrue: [super privateStyle: aText ] ]
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
"class" : {
"default" : "fn 3/26/2019 21:33" },
"instance" : {
"enabled" : "fn 4/13/2019 13:51",
"formatter" : "fn 2/16/2020 22:50",
"lexerFor:" : "fn 2/16/2020 22:58",
"lexerNameFor:" : "fn 9/12/2019 23:57",
"newLexerFor:" : "fn 2/16/2020 22:54",
"newRougeFormatter" : "fn 2/17/2020 13:20",
"privateStyle:" : "fn 6/10/2021 10:10",
"rubyInteropUnbox" : "fn 2/17/2020 13:20",
"rubyUnbox:" : "fn 2/16/2020 22:51",
"startUp" : "fn 2/16/2020 16:55",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
"name" : "PolyglotTextStyler",
"pools" : [
],
"super" : "Object",
"super" : "SHTextStylerST80",
"type" : "normal" }
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
toolbuilder
buildCodePaneWith: builder
^ (super buildCodePaneWith: builder)
stylerClass: PolyglotTextStyler;
help: #helpText;
yourself
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"registerInWorldMenu" : "fn 4/14/2019 00:00" },
"instance" : {
"addModelItemsToWindowMenu:" : "fn 1/26/2021 15:33",
"buildCodePaneWith:" : "fn 1/27/2020 11:06",
"buildCodePaneWith:" : "fn 6/10/2021 09:52",
"evaluateExpression:" : "fn 3/5/2021 14:21",
"helpText" : "fn 1/27/2020 11:19",
"labelString" : "fn 1/26/2021 15:53",
Expand Down

0 comments on commit 2378981

Please sign in to comment.