-
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
8 changed files
with
16 additions
and
20 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
packages/MarkdownEditor-Core.package/MarkdownBlock.class/instance/asText.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,5 +1,5 @@ | ||
converting | ||
asText | ||
|
||
self text ifNil: [self text: self generateText. self text addAttribute: (TextColor color: Color random)]. | ||
self text ifNil: [self text: self generateText]. | ||
^ self text |
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
12 changes: 5 additions & 7 deletions
12
...downEditor-Core.package/MarkdownBlockTextStyler.class/instance/buildAttributeRunsFrom..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,15 +1,13 @@ | ||
styling | ||
buildAttributeRunsFrom: aCollectionOfMarkdownBlocks | ||
|
||
| runs time1 time2 | | ||
time1 := TimeStamp now. | ||
| runs newBlocks | | ||
newBlocks:= Set new. | ||
runs := aCollectionOfMarkdownBlocks | ||
inject: RunArray new | ||
into: [:accumulatedRuns :block | |currentBlock| | ||
currentBlock := self blocks detect: [:b | b = block] ifNone: [self blocks add: block. block]. | ||
currentBlock := self newOrExistingBlock: block. | ||
newBlocks add: currentBlock. | ||
accumulatedRuns, currentBlock asText runs]. | ||
Transcript show: 'Time for choosing between old or new: ', (TimeStamp now - time1) asString, Character cr. | ||
time2 := TimeStamp now. | ||
self blocks: (self blocks select: [:b | aCollectionOfMarkdownBlocks includes: b]). | ||
Transcript show: 'Time for removing old blocks: ', (TimeStamp now - time2) asString, Character cr. | ||
self blocks: newBlocks. | ||
^ runs |
4 changes: 1 addition & 3 deletions
4
...MarkdownEditor-Core.package/MarkdownBlockTextStyler.class/instance/newOrExistingBlock..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,8 +1,6 @@ | ||
styling | ||
newOrExistingBlock: aMarkdownBlock | ||
|
||
"if the new block is choosen it will also get added to the Set of blocks" | ||
^ self blocks | ||
detect: [:b | b = aMarkdownBlock] | ||
ifNone: [self blocks add: aMarkdownBlock. | ||
aMarkdownBlock]. | ||
ifNone: [aMarkdownBlock]. |
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
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