Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
HenokLachmann committed Jul 3, 2020
1 parent 029326b commit 522a731
Show file tree
Hide file tree
Showing 14 changed files with 29 additions and 46 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
as yet unclassified
accessing
croppedContent

self subclassResponsibility
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
level
fontSizes

^ Dictionary newFrom: {1 -> 14. 2 -> 12. 3 -> 10}
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
"content" : "MK 6/21/2020 17:47",
"contentAsText" : "cg 6/29/2020 18:34",
"croppedContent" : "cg 6/29/2020 22:21",
"font" : "hsl 6/1/2020 12:24",
"fontColor" : " 7/2/2020 12:57:53",
"fontSize" : "hsl 6/1/2020 12:26",
"fontSizes" : "hsl 6/1/2020 12:26",
"fontSizes" : "hsl 7/2/2020 13:12",
"level" : "hsl 6/1/2020 12:26",
"line" : "hsl 6/1/2020 12:21",
"line:" : "hsl 6/1/2020 12:21",
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
"canChangeFontColor" : "azi 6/28/2020 15:54",
"canChangeFontSize" : "azi 6/28/2020 15:54",
"defaultFontColors" : "azi 6/28/2020 14:23",
"defaultFontSizes" : "azi 6/28/2020 14:24",
"labels" : "azi 6/28/2020 15:31" },
"defaultFontSizes" : "azi 6/28/2020 14:24" },
"instance" : {
"addAttributesTo:" : "azi 6/28/2020 15:56",
"addAttributesTo:from:to:" : "azi 6/28/2020 16:25",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
as yet unclassified
conversion
convertWith: aConverter

^ aConverter convertUnorderedList: self
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"testApplyingThemeDoesNotThrowErrorForInlineStyling" : "mas 5/18/2020 17:27",
"testBuildingEditorReturnsWindow" : "lpf 6/13/2019 15:24",
"testBuildingEditorTextMorphReturnsSpec" : "lpf 6/13/2019 15:29",
"testCreateNewEditorInstanceInWorld" : "azi 6/29/2020 16:47",
"testCreateNewEditorInstanceInWorld" : "hsl 7/2/2020 13:30",
"testMenuBarExists" : "MK 5/14/2020 13:04",
"testMenuOpenCommand" : "jst 5/11/2019 19:56",
"testOpenMarkdownOptions" : "azi 6/29/2020 16:43",
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,4 @@
"testChangeHeadingFontSizes" : "azi 6/13/2020 06:39",
"testChangeParagraphFontSize" : "azi 6/13/2020 06:30",
"testCloseMarkdownOptions" : "azi 6/4/2020 14:59",
"testCreateMarkdownOptions" : "azi 6/29/2020 15:45",
"testDefaultPlaceholderLabel" : "azi 6/28/2020 16:45" } }
"testCreateMarkdownOptions" : "azi 6/29/2020 15:45" } }

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
"instance" : {
"testConvertWith" : "hsl 7/1/2020 12:00",
"testExtendableWith" : "hsl 7/1/2020 03:11",
"testItemAsText" : "hsl 7/1/2020 11:57",
"testLabels" : "hsl 7/1/2020 12:28",
"testListCategoryEqualsListItemCategory" : " 7/2/2020 12:57:53",
"testMayBeginWithCorrectIndentation" : "MK 5/27/2020 14:14",
"testMayBeginWithCorrectIndentationWithText" : "MK 5/27/2020 14:14",
"testMayBeginWithWrongIndentation" : "cg 5/27/2020 13:02",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ as yet unclassified
convertInlines: aMarkdownBlock

| startIndex html inlineElements element nested index nestedMarkdown nestedHTML parent start stop |

aMarkdownBlock styler privateStyle: aMarkdownBlock croppedContent asText.
startIndex := 1.
html := ''.
Expand All @@ -18,22 +19,23 @@ convertInlines: aMarkdownBlock
nested push: element.
[index < inlineElements size and: [(inlineElements at: index + 1) endPosition < element endPosition]]
whileTrue: [nested push: (inlineElements removeAt: index + 1)].
[nested size >= 1]
whileTrue: [nestedMarkdown ifNil: [
nestedMarkdown := nested pop.
start := nestedMarkdown startPosition.
stop := nestedMarkdown endPosition.
nestedHTML := nestedMarkdown convertWith: self]
ifNotNil: [
parent := nested pop.
parent content: (StringUtil replaceFrom: start - parent startPosition + 1 - parent indicator size to: stop - parent startPosition + 1 - parent indicator size in: parent content with: nestedHTML).
nestedMarkdown := parent.
start := nestedMarkdown startPosition.
stop := nestedMarkdown endPosition.
nestedHTML := nestedMarkdown convertWith: self]].

1 to: nested size do: [: i |
nestedMarkdown ifNil: [ nestedMarkdown := nested pop ]
ifNotNil: [
parent := nested pop.
parent content: (StringUtil replaceFrom: start - parent startPosition + 1 - parent indicator size to: stop - parent startPosition + 1 - parent indicator size in: parent content with: nestedHTML).
nestedMarkdown := parent].

start := nestedMarkdown startPosition.
stop := nestedMarkdown endPosition.
nestedHTML := nestedMarkdown convertWith: self].

html := html, nestedHTML.
startIndex := stop + 1.
index := index + 1].
index := index + 1.
nestedMarkdown := nil].

startIndex <= aMarkdownBlock croppedContent size ifTrue: [
html := html, (aMarkdownBlock croppedContent copyFrom: startIndex to: aMarkdownBlock croppedContent size)].

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"convertColorToRGBA:" : "hsl 6/27/2020 16:38",
"convertCommentBlock:" : "MK 6/21/2020 17:45",
"convertHeading:" : "cg 6/29/2020 22:18",
"convertInlines:" : "hsl 6/30/2020 18:22",
"convertInlines:" : "hsl 7/3/2020 12:17",
"convertItalic:" : "cg 6/29/2020 22:01",
"convertLink:" : "cg 6/29/2020 21:42",
"convertList:withTag:" : "cg 6/29/2020 22:20",
Expand Down

0 comments on commit 522a731

Please sign in to comment.