-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
33 additions
and
32 deletions.
There are no files selected for viewing
6 changes: 3 additions & 3 deletions
6
...re.package/SpellcheckCorrectionTextStyler.class/instance/highlightSpellingMistakes.in..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
as yet unclassified | ||
highlightSpellingMistakes: aCollection in: aText | ||
|
||
aCollection keysAndValuesDo: [ :aKey :aValue | aText | ||
addAttribute: (TextEmphasis bold) from: aKey to: aValue ] | ||
|
||
addAttribute: TextEmphasis underlined from: aKey to: aValue; | ||
addAttribute: (TextColor color: Color orange) from: aKey to: aValue ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
packages/Spellcheck-Core.package/SpellcheckCorrectionUI.class/instance/buildWith..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 3 additions & 2 deletions
5
.../Spellcheck-Core.package/SpellcheckCorrectionUI.class/instance/displayCurrentWrongWord.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
as yet unclassified | ||
displayCurrentWrongWord | ||
|
||
|
||
keyArray ifEmpty: [self clear. ^self]. | ||
self wrongWordText: (parser getSentenceContextOfWordAt: self startIndex within: inputText string). | ||
|
||
self wrongWordText: (parser getSentenceContextOfWordAt: self startIndex within: inputText string). | ||
self wrongWordText: (self wrongWordText asText addAttribute: TextEmphasis bold from: self startIndex to: self endIndex) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
packages/Spellcheck-Core.package/Workspace.extension/instance/openSpellcheckerUI.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
*Spellcheck-Core | ||
openSpellcheckerUI | ||
| spellchecker | | ||
spellchecker := SpellcheckCorrectionUI new. | ||
spellchecker open. | ||
spellchecker input: self. | ||
| correctionUI | | ||
correctionUI := SpellcheckCorrectionUI new. | ||
correctionUI open. | ||
correctionUI input: self. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 8 additions & 9 deletions
17
packages/Spellcheck-Tests.package/StylerTests.class/instance/testPrivateStyle.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,17 @@ | ||
as yet unclassified | ||
testPrivateStyle | ||
|
||
| text runs | | ||
| text runArray | | ||
|
||
text := 'There is a miscake in the text' asText. | ||
spellingStyler privateStyle: text. | ||
runs := text runs. | ||
runArray := text runs. | ||
|
||
self assert: ((runs at: 12) includes: TextEmphasis underlined). | ||
self assert: ((runs at: 12) includes: (TextColor color: Color orange)). | ||
|
||
runs := nil. | ||
self assert: ((runArray at: 12) includes: TextEmphasis underlined). | ||
self assert: ((runArray at: 12) includes: (TextColor color: Color orange)). | ||
|
||
correctionStyler privateStyle: text. | ||
runs := text runs. | ||
runArray := text runs. | ||
|
||
self assert: ((runs at: 12) includes: (TextEmphasis bold)). | ||
self deny: ((runs at: 1) includes: (TextEmphasis bold)) | ||
self assert: ((runArray at: 12) includes: TextEmphasis underlined). | ||
self assert: ((runArray at: 12) includes: (TextColor color: Color orange)). |
12 changes: 6 additions & 6 deletions
12
packages/Spellcheck-Tests.package/StylerTests.class/instance/testUnstyle.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
as yet unclassified | ||
testUnstyle | ||
|
||
| text runs | | ||
| text runArray | | ||
|
||
text := 'There is a miscake in the text' asText. | ||
|
||
spellingStyler privateStyle: text. | ||
runs := text runs. | ||
runArray := text runs. | ||
self assert: ((runArray at: 12) includes: (TextColor color: Color orange)). | ||
|
||
self assert: ((runs at: 12) includes: (TextColor color: Color orange)). | ||
spellingStyler unstyle: text. | ||
runs := text runs. | ||
|
||
self deny: ((runs at: 12) includes: (TextColor color: Color orange)) | ||
runArray := text runs. | ||
self deny: ((runArray at: 12) includes: (TextColor color: Color orange)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters