-
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
95 changed files
with
365 additions
and
137 deletions.
There are no files selected for viewing
8 changes: 3 additions & 5 deletions
8
...ditor-Core.package/MarkdownBlockTextStyler.class/instance/determineMatchingBlockClass..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 @@ | ||
parsing | ||
determineMatchingBlockClass: aString | ||
|
||
(MarkdownHeading matches: aString) | ||
ifTrue: [^ MarkdownHeading] | ||
ifFalse: [(MarkdownCodeBlock matches: aString) | ||
ifTrue: [^ MarkdownCodeBlock] | ||
ifFalse: [^ MarkdownParagraph]] | ||
^ {MarkdownHeading. MarkdownCodeBlock. MarkdownCommentBlock} | ||
detect: [:blockClass | blockClass mayBeginWith: aString] | ||
ifNone: [MarkdownParagraph] |
2 changes: 1 addition & 1 deletion
2
...rkdownBlockTextStyler.class/instance/isLastBlockIn.extendableWith.andNotInterruptedBy..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,7 +1,7 @@ | ||
parsing | ||
isLastBlockIn: aCollectionOfMarkdownBlocks extendableWith: aString andNotInterruptedBy: aMarkdownBlockClass | ||
|
||
self flag: #refactor. "This will get nicer obnce we have the MarkdownLine" | ||
self flag: #refactor. "This will get nicer once we have the MarkdownLine" | ||
^ aCollectionOfMarkdownBlocks notEmpty | ||
and: [aCollectionOfMarkdownBlocks last isExtendableWith: aString] | ||
and: [(aCollectionOfMarkdownBlocks last isInterruptedBy: aMarkdownBlockClass) not] |
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: 0 additions & 5 deletions
5
packages/MarkdownEditor-Core.package/MarkdownCodeBlock.class/class/matches..st
This file was deleted.
Oops, something went wrong.
5 changes: 5 additions & 0 deletions
5
packages/MarkdownEditor-Core.package/MarkdownCodeBlock.class/class/mayBeginWith..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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
testing | ||
mayBeginWith: aString | ||
|
||
^ (aString beginsWith: ' ') not | ||
and: [aString matchesRegex: ' *```+[^`]*'] |
2 changes: 1 addition & 1 deletion
2
packages/MarkdownEditor-Core.package/MarkdownCodeBlock.class/methodProperties.json
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
Empty file.
4 changes: 4 additions & 0 deletions
4
packages/MarkdownEditor-Core.package/MarkdownCommentBlock.class/class/closingTag.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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
constants | ||
closingTag | ||
|
||
^ '-->' |
5 changes: 5 additions & 0 deletions
5
packages/MarkdownEditor-Core.package/MarkdownCommentBlock.class/class/mayBeginWith..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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
testing | ||
mayBeginWith: aString | ||
|
||
^ (aString beginsWith: ' ') not | ||
and: [aString withBlanksTrimmed beginsWith: self openingTag] |
4 changes: 4 additions & 0 deletions
4
packages/MarkdownEditor-Core.package/MarkdownCommentBlock.class/class/openingTag.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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
constants | ||
openingTag | ||
|
||
^ '<!--' |
10 changes: 10 additions & 0 deletions
10
packages/MarkdownEditor-Core.package/MarkdownCommentBlock.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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
converting | ||
asText | ||
|
||
| text | | ||
text := self content asText. | ||
text | ||
addAttribute: self textAttribute | ||
from: self commentStart | ||
to: self commentEnd. | ||
^ text |
4 changes: 4 additions & 0 deletions
4
packages/MarkdownEditor-Core.package/MarkdownCommentBlock.class/instance/closingTag.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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
constants | ||
closingTag | ||
|
||
^ self class closingTag |
6 changes: 6 additions & 0 deletions
6
packages/MarkdownEditor-Core.package/MarkdownCommentBlock.class/instance/commentEnd.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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
accessing | ||
commentEnd | ||
|
||
^ self isClosed | ||
ifTrue: [(self content findString: self closingTag) + self closingTag size - 1] | ||
ifFalse: [self content size] |
4 changes: 4 additions & 0 deletions
4
packages/MarkdownEditor-Core.package/MarkdownCommentBlock.class/instance/commentStart.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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
accessing | ||
commentStart | ||
|
||
^ self firstLine findString: self openingTag |
4 changes: 4 additions & 0 deletions
4
packages/MarkdownEditor-Core.package/MarkdownCommentBlock.class/instance/isClosed.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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
testing | ||
isClosed | ||
|
||
^ self lastLine includesSubstring: self closingTag |
4 changes: 4 additions & 0 deletions
4
...ages/MarkdownEditor-Core.package/MarkdownCommentBlock.class/instance/isExtendableWith..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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
testing | ||
isExtendableWith: aString | ||
|
||
^ self isClosed not |
4 changes: 4 additions & 0 deletions
4
packages/MarkdownEditor-Core.package/MarkdownCommentBlock.class/instance/isInterruptedBy..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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
testing | ||
isInterruptedBy: aMarkdownBlockClass | ||
|
||
^ false |
4 changes: 4 additions & 0 deletions
4
packages/MarkdownEditor-Core.package/MarkdownCommentBlock.class/instance/openingTag.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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
constants | ||
openingTag | ||
|
||
^ self class openingTag |
4 changes: 4 additions & 0 deletions
4
packages/MarkdownEditor-Core.package/MarkdownCommentBlock.class/instance/textAttribute.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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
accessing | ||
textAttribute | ||
|
||
^ TextColor color: Color lightGray |
15 changes: 15 additions & 0 deletions
15
packages/MarkdownEditor-Core.package/MarkdownCommentBlock.class/methodProperties.json
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"class" : { | ||
"closingTag" : "jko 6/27/2019 21:41", | ||
"mayBeginWith:" : "jko 6/29/2019 16:20", | ||
"openingTag" : "jko 6/27/2019 21:40" }, | ||
"instance" : { | ||
"asText" : "jko 6/28/2019 23:54", | ||
"closingTag" : "jko 6/29/2019 00:16", | ||
"commentEnd" : "jko 7/1/2019 10:45", | ||
"commentStart" : "jko 6/29/2019 00:16", | ||
"isClosed" : "jko 6/29/2019 00:16", | ||
"isExtendableWith:" : "jko 6/24/2019 14:42", | ||
"isInterruptedBy:" : "jko 6/24/2019 15:44", | ||
"openingTag" : "jko 6/29/2019 00:16", | ||
"textAttribute" : "jko 6/28/2019 23:54" } } |
14 changes: 14 additions & 0 deletions
14
packages/MarkdownEditor-Core.package/MarkdownCommentBlock.class/properties.json
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"category" : "MarkdownEditor-Core", | ||
"classinstvars" : [ | ||
], | ||
"classvars" : [ | ||
], | ||
"commentStamp" : "", | ||
"instvars" : [ | ||
], | ||
"name" : "MarkdownCommentBlock", | ||
"pools" : [ | ||
], | ||
"super" : "MarkdownBlock", | ||
"type" : "normal" } |
4 changes: 0 additions & 4 deletions
4
packages/MarkdownEditor-Core.package/MarkdownEmphasisDelimiter.class/class/precedence.st
This file was deleted.
Oops, something went wrong.
3 changes: 1 addition & 2 deletions
3
packages/MarkdownEditor-Core.package/MarkdownEmphasisDelimiter.class/methodProperties.json
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
2 changes: 1 addition & 1 deletion
2
...e/MarkdownHeading.class/class/matches..st → ...kdownHeading.class/class/mayBeginWith..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
2 changes: 1 addition & 1 deletion
2
packages/MarkdownEditor-Core.package/MarkdownHeading.class/methodProperties.json
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
4 changes: 0 additions & 4 deletions
4
...ages/MarkdownEditor-Core.package/MarkdownInlineTextStyler.class/instance/tokenClasses..st
This file was deleted.
Oops, something went wrong.
4 changes: 0 additions & 4 deletions
4
packages/MarkdownEditor-Core.package/MarkdownInlineTextStyler.class/instance/tokenClasses.st
This file was deleted.
Oops, something went wrong.
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
4 changes: 0 additions & 4 deletions
4
packages/MarkdownEditor-Core.package/MarkdownString.class/class/precedence.st
This file was deleted.
Oops, something went wrong.
3 changes: 1 addition & 2 deletions
3
packages/MarkdownEditor-Core.package/MarkdownString.class/methodProperties.json
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,7 +1,6 @@ | ||
{ | ||
"class" : { | ||
"mayBeginWith:" : "fgo 5/21/2019 16:36", | ||
"precedence" : "jko 5/6/2019 14:46" }, | ||
"mayBeginWith:" : "fgo 5/21/2019 16:36" }, | ||
"instance" : { | ||
"fillContentFrom:" : "fgo 5/21/2019 15:18", | ||
"isDelimiter" : "jko 5/6/2019 14:52" } } |
4 changes: 0 additions & 4 deletions
4
packages/MarkdownEditor-Core.package/MarkdownToken.class/class/^less.equals.st
This file was deleted.
Oops, something went wrong.
4 changes: 0 additions & 4 deletions
4
packages/MarkdownEditor-Core.package/MarkdownToken.class/class/precedence.st
This file was deleted.
Oops, something went wrong.
4 changes: 1 addition & 3 deletions
4
packages/MarkdownEditor-Core.package/MarkdownToken.class/methodProperties.json
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
6 changes: 6 additions & 0 deletions
6
...kTextStylerTest.class/instance/testBlockStructureCodeBlockNotInterruptedByCommentBlock.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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
tests - blocks | ||
testBlockStructureCodeBlockNotInterruptedByCommentBlock | ||
|
||
self | ||
assert: {MarkdownCodeBlock} | ||
isParsedStructureOf: '```', Character cr, '<!-- Not a comment -->', Character cr, '```' |
6 changes: 6 additions & 0 deletions
6
...ests.package/MarkdownBlockTextStylerTest.class/instance/testBlockStructureCommentBlock.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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
tests - blocks | ||
testBlockStructureCommentBlock | ||
|
||
self | ||
assert: {MarkdownCommentBlock} | ||
isParsedStructureOf: '<!-- -->' |
7 changes: 7 additions & 0 deletions
7
...wnBlockTextStylerTest.class/instance/testBlockStructureCommentBlockFollowedByParagraph.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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
tests - blocks | ||
testBlockStructureCommentBlockFollowedByParagraph | ||
|
||
self | ||
assert: {MarkdownCommentBlock. MarkdownParagraph} | ||
isParsedStructureOf: '<!-- Comment about MiniMetro being amazing -->', Character cr, | ||
'Paragraph describing the game' |
6 changes: 6 additions & 0 deletions
6
...kTextStylerTest.class/instance/testBlockStructureCommentBlockNotInterruptedByCodeBlock.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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
tests - blocks | ||
testBlockStructureCommentBlockNotInterruptedByCodeBlock | ||
|
||
self | ||
assert: {MarkdownCommentBlock} | ||
isParsedStructureOf: '<!--', Character cr, '```', Character cr, 'not code', Character cr, '```', Character cr, '-->' |
6 changes: 6 additions & 0 deletions
6
...ockTextStylerTest.class/instance/testBlockStructureCommentBlockNotInterruptedByHeading.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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
tests - blocks | ||
testBlockStructureCommentBlockNotInterruptedByHeading | ||
|
||
self | ||
assert: {MarkdownCommentBlock} | ||
isParsedStructureOf: '<!--', Character cr, '# Not a heading', Character cr, '-->' |
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: 0 additions & 5 deletions
5
...downEditor-Tests.package/MarkdownCodeBlockTest.class/instance/testMatch1To3Indentation.st
This file was deleted.
Oops, something went wrong.
4 changes: 0 additions & 4 deletions
4
.../MarkdownEditor-Tests.package/MarkdownCodeBlockTest.class/instance/testMatch3Backticks.st
This file was deleted.
Oops, something went wrong.
4 changes: 0 additions & 4 deletions
4
...r-Tests.package/MarkdownCodeBlockTest.class/instance/testMatch3BackticksWithInfoString.st
This file was deleted.
Oops, something went wrong.
4 changes: 0 additions & 4 deletions
4
.../MarkdownEditor-Tests.package/MarkdownCodeBlockTest.class/instance/testMatch4Backticks.st
This file was deleted.
Oops, something went wrong.
7 changes: 7 additions & 0 deletions
7
...tor-Tests.package/MarkdownCodeBlockTest.class/instance/testMayBeginWith1To3Indentation.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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
tests - matching | ||
testMayBeginWith1To3Indentation | ||
|
||
{' ```'. ' ```'. ' ```'} do: [:openingLine | | ||
self assert: (MarkdownCodeBlock mayBeginWith: openingLine)] | ||
|
||
|
4 changes: 4 additions & 0 deletions
4
...wnEditor-Tests.package/MarkdownCodeBlockTest.class/instance/testMayBeginWith3Backticks.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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
tests - matching | ||
testMayBeginWith3Backticks | ||
|
||
self assert: (MarkdownCodeBlock mayBeginWith: '```') |
4 changes: 4 additions & 0 deletions
4
....package/MarkdownCodeBlockTest.class/instance/testMayBeginWith3BackticksWithInfoString.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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
tests - matching | ||
testMayBeginWith3BackticksWithInfoString | ||
|
||
self assert: (MarkdownCodeBlock mayBeginWith: '```smalltalk') |
Oops, something went wrong.