Skip to content

Commit

Permalink
Move to Tonel v3
Browse files Browse the repository at this point in the history
  • Loading branch information
demarey committed Oct 11, 2023
1 parent 07fe3d4 commit 7b6f758
Show file tree
Hide file tree
Showing 390 changed files with 4,953 additions and 4,457 deletions.
13 changes: 7 additions & 6 deletions src/BaselineOfMicrodown/BaselineOfMicrodown.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ Microdown is a minimal but extensible markup language. It is kind of compatible
Read comment of MicroDownParser.
"
Class {
#name : #BaselineOfMicrodown,
#superclass : #BaselineOf,
#category : #BaselineOfMicrodown
#name : 'BaselineOfMicrodown',
#superclass : 'BaselineOf',
#category : 'BaselineOfMicrodown',
#package : 'BaselineOfMicrodown'
}

{ #category : #baselines }
{ #category : 'baselines' }
BaselineOfMicrodown >> baseline: spec [

<baseline>
Expand Down Expand Up @@ -99,7 +100,7 @@ BaselineOfMicrodown >> baseline: spec [
group: 'All' with: #('Core' 'Tests' 'Extensions' 'Microdown-Pharo-Tools' 'RichText') ]
]

{ #category : #'external projects' }
{ #category : 'external projects' }
BaselineOfMicrodown >> pillar: spec [

spec
Expand All @@ -110,7 +111,7 @@ BaselineOfMicrodown >> pillar: spec [
repository: 'github://pillar-markup/pillar:dev-8' ]
]

{ #category : #'external projects' }
{ #category : 'external projects' }
BaselineOfMicrodown >> xmlParserHtml: spec [

spec
Expand Down
8 changes: 5 additions & 3 deletions src/BaselineOfMicrodown/ManifestBaselineOfMicrodown.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ The Microdown project is a parser and document model for Microdown a clean and l
See `#'Microdown'`
"
Class {
#name : #ManifestBaselineOfMicrodown,
#superclass : #PackageManifest,
#category : #'BaselineOfMicrodown-Manifest'
#name : 'ManifestBaselineOfMicrodown',
#superclass : 'PackageManifest',
#category : 'BaselineOfMicrodown-Manifest',
#package : 'BaselineOfMicrodown',
#tag : 'Manifest'
}
2 changes: 1 addition & 1 deletion src/BaselineOfMicrodown/package.st
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Package { #name : #BaselineOfMicrodown }
Package { #name : 'BaselineOfMicrodown' }
9 changes: 5 additions & 4 deletions src/BaselineOfMicrodownDev/BaselineOfMicrodownDev.class.st
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
Class {
#name : #BaselineOfMicrodownDev,
#superclass : #BaselineOf,
#category : #BaselineOfMicrodownDev
#name : 'BaselineOfMicrodownDev',
#superclass : 'BaselineOf',
#category : 'BaselineOfMicrodownDev',
#package : 'BaselineOfMicrodownDev'
}

{ #category : #baselines }
{ #category : 'baselines' }
BaselineOfMicrodownDev >> baseline: spec [

<baseline>
Expand Down
2 changes: 1 addition & 1 deletion src/BaselineOfMicrodownDev/package.st
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Package { #name : #BaselineOfMicrodownDev }
Package { #name : 'BaselineOfMicrodownDev' }
9 changes: 5 additions & 4 deletions src/BaselineOfMicrodownH5P/BaselineOfMicrodownH5P.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@ baseline: spec
]
"
Class {
#name : #BaselineOfMicrodownH5P,
#superclass : #BaselineOf,
#category : #BaselineOfMicrodownH5P
#name : 'BaselineOfMicrodownH5P',
#superclass : 'BaselineOf',
#category : 'BaselineOfMicrodownH5P',
#package : 'BaselineOfMicrodownH5P'
}

{ #category : #baselines }
{ #category : 'baselines' }
BaselineOfMicrodownH5P >> baseline: spec [
<baseline>

Expand Down
2 changes: 1 addition & 1 deletion src/BaselineOfMicrodownH5P/package.st
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Package { #name : #BaselineOfMicrodownH5P }
Package { #name : 'BaselineOfMicrodownH5P' }
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
Class {
#name : #BaselineOfPillarSlideConverter,
#superclass : #BaselineOf,
#category : #BaselineOfPillarSlideConverter
#name : 'BaselineOfPillarSlideConverter',
#superclass : 'BaselineOf',
#category : 'BaselineOfPillarSlideConverter',
#package : 'BaselineOfPillarSlideConverter'
}

{ #category : #baselines }
{ #category : 'baselines' }
BaselineOfPillarSlideConverter >> baseline: spec [
<baseline>

Expand Down
2 changes: 1 addition & 1 deletion src/BaselineOfPillarSlideConverter/package.st
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Package { #name : #BaselineOfPillarSlideConverter }
Package { #name : 'BaselineOfPillarSlideConverter' }
7 changes: 4 additions & 3 deletions src/Microdown - HTML/MicHTMLBrush.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
I'm an abstract brush dedicated to HTML documents. As of today, the only subclass is the tag brush but we can imagine others (e.g., to write HTML comments).
"
Class {
#name : #MicHTMLBrush,
#superclass : #MicExportBrush,
#name : 'MicHTMLBrush',
#superclass : 'MicExportBrush',
#instVars : [
'name'
],
#category : #'Microdown - HTML'
#category : 'Microdown - HTML',
#package : 'Microdown - HTML'
}
13 changes: 7 additions & 6 deletions src/Microdown - HTML/MicHTMLCanvas.class.st
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
Class {
#name : #MicHTMLCanvas,
#superclass : #MicExportCanvas,
#name : 'MicHTMLCanvas',
#superclass : 'MicExportCanvas',
#instVars : [
'name'
],
#classVars : [
'HTMLCharacters'
],
#category : #'Microdown - HTML'
#category : 'Microdown - HTML',
#package : 'Microdown - HTML'
}

{ #category : #initialization }
{ #category : 'initialization' }
MicHTMLCanvas class >> initialize [
HTMLCharacters := Dictionary new.
HTMLCharacters
Expand All @@ -20,14 +21,14 @@ MicHTMLCanvas class >> initialize [
at: $> put: '&gt;'
]
{ #category : #accessing }
{ #category : 'accessing' }
MicHTMLCanvas >> nextPut: aCharacter [
(HTMLCharacters at: aCharacter ifAbsent: nil)
ifNil: [ super nextPut: aCharacter ]
ifNotNil: [ :string | self raw: string ]
]
{ #category : #accessing }
{ #category : 'accessing' }
MicHTMLCanvas >> tag [
^ self brush: MicHTMLTag new
]
15 changes: 8 additions & 7 deletions src/Microdown - HTML/MicHTMLExporterTest.class.st
Original file line number Diff line number Diff line change
@@ -1,38 +1,39 @@
Class {
#name : #MicHTMLExporterTest,
#superclass : #TestCase,
#name : 'MicHTMLExporterTest',
#superclass : 'TestCase',
#instVars : [
'parser',
'writer',
'factory'
],
#category : #'Microdown - HTML'
#category : 'Microdown - HTML',
#package : 'Microdown - HTML'
}

{ #category : #utils }
{ #category : 'utils' }
MicHTMLExporterTest >> parse: aString andCheckWeGet: aResultingString [

| mic |
mic := parser parse: aString.
self assert: (writer visit: mic) contents equals: aResultingString
]

{ #category : #running }
{ #category : 'running' }
MicHTMLExporterTest >> setUp [
super setUp.
parser := MicroDownParser new.
writer := MicHTMLWriter new.
factory := MicMicrodownSnippetFactory new
]

{ #category : #tests }
{ #category : 'tests' }
MicHTMLExporterTest >> testHeaderLevel1 [

self parse: factory headerLevel1Sample andCheckWeGet: writer usedNewLine , '<h1>Foo</h1>'

]

{ #category : #tests }
{ #category : 'tests' }
MicHTMLExporterTest >> testUnorderedList [
| mic |
mic := parser parse: factory unorderedListWithTwoItemsSample.
Expand Down
13 changes: 7 additions & 6 deletions src/Microdown - HTML/MicHTMLTag.class.st
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
Class {
#name : #MicHTMLTag,
#superclass : #MicHTMLBrush,
#category : #'Microdown - HTML'
#name : 'MicHTMLTag',
#superclass : 'MicHTMLBrush',
#category : 'Microdown - HTML',
#package : 'Microdown - HTML'
}

{ #category : #accessing }
{ #category : 'accessing' }
MicHTMLTag >> name: aString [
name := aString.
stream nextPut: $<; << aString
]

{ #category : #accessing }
{ #category : 'accessing' }
MicHTMLTag >> parameterAt: aString put: anotherString [
stream space. stream << aString << '="' << anotherString << '"'
]

{ #category : #accessing }
{ #category : 'accessing' }
MicHTMLTag >> with: aString [
stream
nextPut: $>;
Expand Down
21 changes: 11 additions & 10 deletions src/Microdown - HTML/MicHTMLWriter.class.st
Original file line number Diff line number Diff line change
@@ -1,40 +1,41 @@
Class {
#name : #MicHTMLWriter,
#superclass : #MicrodownVisitor,
#name : 'MicHTMLWriter',
#superclass : 'MicrodownVisitor',
#instVars : [
'stream',
'canvas'
],
#category : #'Microdown - HTML'
#category : 'Microdown - HTML',
#package : 'Microdown - HTML'
}

{ #category : #initialization }
{ #category : 'initialization' }
MicHTMLWriter >> canvasClass [

^ MicHTMLCanvas
]

{ #category : #accessing }
{ #category : 'accessing' }
MicHTMLWriter >> contents [
^ stream contents
]

{ #category : #initialization }
{ #category : 'initialization' }
MicHTMLWriter >> initialize [
super initialize.
stream := MicOutputStream new setStream: (WriteStream on: (String new: 1000)).
canvas := self canvasClass on: stream.

]

{ #category : #initialization }
{ #category : 'initialization' }
MicHTMLWriter >> usedNewLine [
"Return the encoded new line. Useful for tests."

^ stream usedNewLine
]

{ #category : #visiting }
{ #category : 'visiting' }
MicHTMLWriter >> visitHeader: aHeader [

canvas newLine.
Expand All @@ -44,7 +45,7 @@ MicHTMLWriter >> visitHeader: aHeader [

]

{ #category : #visiting }
{ #category : 'visiting' }
MicHTMLWriter >> visitUnorderedList: anUnorderedList [

canvas newLine.
Expand All @@ -53,7 +54,7 @@ MicHTMLWriter >> visitUnorderedList: anUnorderedList [
with: [ canvas newLine. super visitUnorderedList: anUnorderedList ]
]

{ #category : #visiting }
{ #category : 'visiting' }
MicHTMLWriter >> visitUnorderedListItem: anUnorderedListItem [
"will not work with we have text decorators such as bold, italic, monospace"

Expand Down
2 changes: 1 addition & 1 deletion src/Microdown - HTML/package.st
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Package { #name : #'Microdown - HTML' }
Package { #name : 'Microdown - HTML' }
13 changes: 7 additions & 6 deletions src/Microdown-Agenda-Tests/MicAgendaBlockTest.class.st
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
Class {
#name : #MicAgendaBlockTest,
#superclass : #TestCase,
#name : 'MicAgendaBlockTest',
#superclass : 'TestCase',
#instVars : [
'builder',
'parser'
],
#pools : [
'MicMicrodownSharedPool'
],
#category : #'Microdown-Agenda-Tests'
#category : 'Microdown-Agenda-Tests',
#package : 'Microdown-Agenda-Tests'
}

{ #category : #running }
{ #category : 'running' }
MicAgendaBlockTest >> setUp [

super setUp.
builder := MicMicrodownTextualBuilder new.
parser := Microdown new.
]

{ #category : #tests }
{ #category : 'tests' }
MicAgendaBlockTest >> testAgenda [
"'<!agenda
!>
Expand All @@ -33,7 +34,7 @@ MicAgendaBlockTest >> testAgenda [
self assert: env environmentName equals: 'agenda'
]

{ #category : #tests }
{ #category : 'tests' }
MicAgendaBlockTest >> testAgendaWithArgument [
"'<!agenda|title='A cool agenda'
!>
Expand Down
Loading

0 comments on commit 7b6f758

Please sign in to comment.