-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #140 from SWTI2014/parsing/different-tags
Parsing/different tags
- Loading branch information
Showing
37 changed files
with
184 additions
and
4 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
accessing | ||
target | ||
^ self attributes at: 'target' ifAbsent: [nil] |
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
7 changes: 7 additions & 0 deletions
7
packages/HTML.package/HtmlCODENode.class/instance/addDefaultStyle.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 @@ | ||
accessing | ||
addDefaultStyle | ||
| styles | | ||
styles := Dictionary newFrom: { | ||
'font-family' -> 'Courier New'. | ||
}. | ||
self addStyle: (CSSStyleRule fromDictionary: styles) |
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 |
---|---|---|
|
@@ -2,4 +2,5 @@ | |
"class" : { | ||
}, | ||
"instance" : { | ||
"addDefaultStyle" : "SS 6/28/2014 20:47", | ||
"tag" : "" } } |
8 changes: 8 additions & 0 deletions
8
packages/HTML.package/HtmlDFNNode.class/instance/addDefaultStyle.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,8 @@ | ||
accessing | ||
addDefaultStyle | ||
| styles | | ||
styles := Dictionary newFrom: { | ||
'font-style' -> 'italic'. | ||
'font-family' -> 'Times'. | ||
}. | ||
self addStyle: (CSSStyleRule fromDictionary: styles) |
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 |
---|---|---|
|
@@ -2,4 +2,5 @@ | |
"class" : { | ||
}, | ||
"instance" : { | ||
"addDefaultStyle" : "SS 6/28/2014 18:42", | ||
"tag" : "" } } |
7 changes: 7 additions & 0 deletions
7
packages/HTML.package/HtmlEMNode.class/instance/addDefaultStyle.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 @@ | ||
accessing | ||
addDefaultStyle | ||
| styles | | ||
styles := Dictionary newFrom: { | ||
'font-style' -> 'italic'. | ||
}. | ||
self addStyle: (CSSStyleRule fromDictionary: styles) |
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 |
---|---|---|
|
@@ -2,4 +2,5 @@ | |
"class" : { | ||
}, | ||
"instance" : { | ||
"addDefaultStyle" : "SS 6/28/2014 18:35", | ||
"tag" : "" } } |
7 changes: 7 additions & 0 deletions
7
packages/HTML.package/HtmlKBDNode.class/instance/addDefaultStyle.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 @@ | ||
accessing | ||
addDefaultStyle | ||
| styles | | ||
styles := Dictionary newFrom: { | ||
'font-family' -> 'TrebuchetMS'. | ||
}. | ||
self addStyle: (CSSStyleRule fromDictionary: styles) |
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 |
---|---|---|
|
@@ -2,4 +2,5 @@ | |
"class" : { | ||
}, | ||
"instance" : { | ||
"addDefaultStyle" : "SS 6/29/2014 18:13", | ||
"tag" : "" } } |
Empty file.
4 changes: 4 additions & 0 deletions
4
packages/HTML.package/HtmlNodeDefaultStyleTest.class/instance/htmlFormatter..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 | ||
htmlFormatter: anObject | ||
|
||
htmlFormatter := anObject |
4 changes: 4 additions & 0 deletions
4
packages/HTML.package/HtmlNodeDefaultStyleTest.class/instance/htmlFormatter.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 | ||
htmlFormatter | ||
|
||
^ htmlFormatter |
5 changes: 5 additions & 0 deletions
5
packages/HTML.package/HtmlNodeDefaultStyleTest.class/instance/setUp.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 @@ | ||
accessing | ||
setUp | ||
self timeout: 300. | ||
self htmlFormatter: DHtmlFormatter new. | ||
self styleResolver: CSSStyleResolver new |
4 changes: 4 additions & 0 deletions
4
packages/HTML.package/HtmlNodeDefaultStyleTest.class/instance/styleResolver..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 | ||
styleResolver: anObject | ||
|
||
styleResolver := anObject |
4 changes: 4 additions & 0 deletions
4
packages/HTML.package/HtmlNodeDefaultStyleTest.class/instance/styleResolver.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 | ||
styleResolver | ||
|
||
^ styleResolver |
7 changes: 7 additions & 0 deletions
7
...TML.package/HtmlNodeDefaultStyleTest.class/instance/test01EmphasizedTextShouldBeItalic.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 @@ | ||
accessing | ||
test01EmphasizedTextShouldBeItalic | ||
| document node | | ||
document := HtmlDocument new. | ||
document parseContents: (ReadStream on: '<em>emphasized text</em>'). | ||
node := document children first. | ||
self assert: (self styleResolver getStyle: #italic for: node) equals: true. |
7 changes: 7 additions & 0 deletions
7
...ages/HTML.package/HtmlNodeDefaultStyleTest.class/instance/test02StrongTextShouldBeBold.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 @@ | ||
accessing | ||
test02StrongTextShouldBeBold | ||
| document node | | ||
document := HtmlDocument new. | ||
document parseContents: (ReadStream on: '<strong>strong text</strong>'). | ||
node := document children first. | ||
self assert: (self styleResolver getStyle: #bold for: node) equals: true. |
9 changes: 9 additions & 0 deletions
9
...package/HtmlNodeDefaultStyleTest.class/instance/test03DefinitionShouldBeItalicAndTimes.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,9 @@ | ||
accessing | ||
test03DefinitionShouldBeItalicAndTimes | ||
| document node | | ||
document := HtmlDocument new. | ||
document parseContents: (ReadStream on: '<dfn>definition</dfn>'). | ||
node := document children first. | ||
self assert: (self styleResolver getStyle: #italic for: node) equals: true. | ||
self assert: (self styleResolver getStyle: #family for: node) | ||
equals: (TextStyle named: 'NimbusRomanNo9L'). |
8 changes: 8 additions & 0 deletions
8
...ages/HTML.package/HtmlNodeDefaultStyleTest.class/instance/test04CodeShouldBeCourierNew.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,8 @@ | ||
accessing | ||
test04CodeShouldBeCourierNew | ||
| document node | | ||
document := HtmlDocument new. | ||
document parseContents: (ReadStream on: '<code>computer code</code>'). | ||
node := document children first. | ||
self assert: (self styleResolver getStyle: #family for: node) | ||
equals: (TextStyle named: 'NimbusMonoL'). |
8 changes: 8 additions & 0 deletions
8
packages/HTML.package/HtmlNodeDefaultStyleTest.class/instance/test05OutputShouldBeGeorgia.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,8 @@ | ||
accessing | ||
test05OutputShouldBeGeorgia | ||
| document node | | ||
document := HtmlDocument new. | ||
document parseContents: (ReadStream on: '<samp>sample output</samp>'). | ||
node := document children first. | ||
self assert: (self styleResolver getStyle: #family for: node) | ||
equals: (TextStyle named: 'Georgia'). |
8 changes: 8 additions & 0 deletions
8
...es/HTML.package/HtmlNodeDefaultStyleTest.class/instance/test06InputShouldBeTrebuchetMS.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,8 @@ | ||
accessing | ||
test06InputShouldBeTrebuchetMS | ||
| document node | | ||
document := HtmlDocument new. | ||
document parseContents: (ReadStream on: '<kbd>sample input</kbd>'). | ||
node := document children first. | ||
self assert: (self styleResolver getStyle: #family for: node) | ||
equals: (TextStyle named: 'TrebuchetMS'). |
8 changes: 8 additions & 0 deletions
8
...HTML.package/HtmlNodeDefaultStyleTest.class/instance/test07TeletypeShouldBeTrebuchetMS.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,8 @@ | ||
accessing | ||
test07TeletypeShouldBeTrebuchetMS | ||
| document node | | ||
document := HtmlDocument new. | ||
document parseContents: (ReadStream on: '<tt>teletype text</tt>'). | ||
node := document children first. | ||
self assert: (self styleResolver getStyle: #family for: node) | ||
equals: (TextStyle named: 'TrebuchetMS'). |
8 changes: 8 additions & 0 deletions
8
.../HTML.package/HtmlNodeDefaultStyleTest.class/instance/test08VariableShouldBeCourierNew.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,8 @@ | ||
accessing | ||
test08VariableShouldBeCourierNew | ||
| document node | | ||
document := HtmlDocument new. | ||
document parseContents: (ReadStream on: '<var>sample variable</var>'). | ||
node := document children first. | ||
self assert: (self styleResolver getStyle: #family for: node) | ||
equals: (TextStyle named: 'NimbusMonoL'). |
17 changes: 17 additions & 0 deletions
17
packages/HTML.package/HtmlNodeDefaultStyleTest.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,17 @@ | ||
{ | ||
"class" : { | ||
}, | ||
"instance" : { | ||
"htmlFormatter" : "SS 6/28/2014 19:37", | ||
"htmlFormatter:" : "SS 6/28/2014 19:37", | ||
"setUp" : "SS 6/28/2014 19:38", | ||
"styleResolver" : "SS 6/28/2014 19:38", | ||
"styleResolver:" : "SS 6/28/2014 19:38", | ||
"test01EmphasizedTextShouldBeItalic" : "SS 6/28/2014 19:41", | ||
"test02StrongTextShouldBeBold" : "SS 6/28/2014 19:42", | ||
"test03DefinitionShouldBeItalicAndTimes" : "SS 6/28/2014 19:53", | ||
"test04CodeShouldBeCourierNew" : "SS 6/28/2014 20:50", | ||
"test05OutputShouldBeGeorgia" : "SS 6/28/2014 20:49", | ||
"test06InputShouldBeTrebuchetMS" : "SS 6/29/2014 18:14", | ||
"test07TeletypeShouldBeTrebuchetMS" : "SS 6/29/2014 18:15", | ||
"test08VariableShouldBeCourierNew" : "SS 6/29/2014 18:15" } } |
15 changes: 15 additions & 0 deletions
15
packages/HTML.package/HtmlNodeDefaultStyleTest.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,15 @@ | ||
{ | ||
"category" : "HTML-Tests", | ||
"classinstvars" : [ | ||
], | ||
"classvars" : [ | ||
], | ||
"commentStamp" : "", | ||
"instvars" : [ | ||
"htmlFormatter", | ||
"styleResolver" ], | ||
"name" : "HtmlNodeDefaultStyleTest", | ||
"pools" : [ | ||
], | ||
"super" : "TestCase", | ||
"type" : "normal" } |
7 changes: 7 additions & 0 deletions
7
packages/HTML.package/HtmlSAMPNode.class/instance/addDefaultStyle.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 @@ | ||
accessing | ||
addDefaultStyle | ||
| styles | | ||
styles := Dictionary newFrom: { | ||
'font-family' -> 'Georgia'. | ||
}. | ||
self addStyle: (CSSStyleRule fromDictionary: styles) |
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 |
---|---|---|
|
@@ -2,4 +2,5 @@ | |
"class" : { | ||
}, | ||
"instance" : { | ||
"addDefaultStyle" : "SS 6/28/2014 20:49", | ||
"tag" : "" } } |
7 changes: 7 additions & 0 deletions
7
packages/HTML.package/HtmlTTNode.class/instance/addDefaultStyle.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 @@ | ||
accessing | ||
addDefaultStyle | ||
| styles | | ||
styles := Dictionary newFrom: { | ||
'font-family' -> 'TrebuchetMS'. | ||
}. | ||
self addStyle: (CSSStyleRule fromDictionary: styles) |
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 |
---|---|---|
|
@@ -2,4 +2,5 @@ | |
"class" : { | ||
}, | ||
"instance" : { | ||
"addDefaultStyle" : "SS 6/29/2014 18:13", | ||
"tag" : "" } } |
8 changes: 8 additions & 0 deletions
8
packages/HTML.package/HtmlVARNode.class/instance/addDefaultStyle.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,8 @@ | ||
accessing | ||
addDefaultStyle | ||
| styles | | ||
styles := Dictionary newFrom: { | ||
'font-style' -> 'italic'. | ||
'font-family' -> 'Courier New'. | ||
}. | ||
self addStyle: (CSSStyleRule fromDictionary: styles) |
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 |
---|---|---|
|
@@ -2,4 +2,5 @@ | |
"class" : { | ||
}, | ||
"instance" : { | ||
"addDefaultStyle" : "SS 6/28/2014 20:47", | ||
"tag" : "" } } |
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 +1 @@ | ||
a9c1b4cd-3f84-8344-a94e-e1f22e4351f8 | ||
fea643b6-5bbb-4b70-9584-e8f6b9377725 |
1 change: 1 addition & 0 deletions
1
...s/HTML.package/monticello.meta/version.d/HTML-SS.111_496850ef-58a0-4f71-b120-ab36520a38c2
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
1 change: 1 addition & 0 deletions
1
...s/HTML.package/monticello.meta/version.d/HTML-SS.112_fea643b6-5bbb-4b70-9584-e8f6b9377725
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