-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use testcase tiddlers for html examples (#8376)
* Convert several html examples into testcase tiddlers * Convert html table exmaple into testcase tiddler
- Loading branch information
Showing
6 changed files
with
137 additions
and
39 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
editions/tw5.com/tiddlers/testcases/HTML/BlockModeInHTMLTable.tid
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,30 @@ | ||
created: 20240713164810184 | ||
description: Block mode for table cells | ||
modified: 20240713164810184 | ||
tags: $:/tags/wiki-test-spec | ||
title: TestCases/HTML/BlockModeInHTMLTable | ||
type: text/vnd.tiddlywiki-multiple | ||
|
||
title: Narrative | ||
|
||
Unlike the table wiki syntax, the less convenient `<table>`, `<tr>`, `<td>` html tags can use a blank line | ||
to get block mode punctuation regognised inside of table cells. | ||
+ | ||
title: Output | ||
|
||
<table> | ||
<tr><td> | ||
|
||
* list item one | ||
* list item two | ||
</td><td> | ||
|
||
|nested|table| | ||
</td></tr> | ||
</table> | ||
+ | ||
title: ExpectedResult | ||
|
||
<p><table> | ||
<tr><td><ul><li>list item one</li><li>list item two</li></ul></td><td><table><tbody><tr class="evenRow"><td>nested</td><td>table</td></tr></tbody></table></td></tr> | ||
</table></p> |
23 changes: 23 additions & 0 deletions
23
editions/tw5.com/tiddlers/testcases/HTML/OpenTagBlankLine.tid
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,23 @@ | ||
created: 20240622142425004 | ||
description: Blank line after open tag | ||
modified: 20240622144230258 | ||
tags: $:/tags/wiki-test-spec | ||
title: TestCases/HTML/OpenTagBlankLine | ||
type: text/vnd.tiddlywiki-multiple | ||
|
||
title: Narrative | ||
|
||
A blank line after an open html tag allows block mode punctuation to be recognised | ||
+ | ||
title: Output | ||
|
||
<div> | ||
|
||
* blank line after open tag allows | ||
* block mode punctuation (i.e. this list) to | ||
* be recognised | ||
</div> | ||
+ | ||
title: ExpectedResult | ||
|
||
<div><ul><li>blank line after open tag allows</li><li>block mode punctuation (i.e. this list) to</li><li>be recognised</li></ul></div> |
22 changes: 22 additions & 0 deletions
22
editions/tw5.com/tiddlers/testcases/HTML/OpenTagBlankLineInBoldSyntax.tid
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,22 @@ | ||
created: 20240622144038465 | ||
description: Blank line after open tag in bold syntax | ||
modified: 20240622145114506 | ||
tags: $:/tags/wiki-test-spec | ||
title: TestCases/HTML/OpenTagBlankLineInBoldSyntax | ||
type: text/vnd.tiddlywiki-multiple | ||
|
||
title: Narrative | ||
|
||
A blank line after an open html tag allows block mode punctuation to be recognised even when the html is embedded within inline punctuation (bold here). | ||
+ | ||
title: Output | ||
|
||
''<div> | ||
|
||
* list item one | ||
* list item two | ||
</div>'' | ||
+ | ||
title: ExpectedResult | ||
|
||
<p><strong><div><ul><li>list item one</li><li>list item two</li></ul></div></strong></p> |
22 changes: 22 additions & 0 deletions
22
editions/tw5.com/tiddlers/testcases/HTML/OpenTagBlankLineInTableSyntax.tid
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,22 @@ | ||
created: 20240622144753311 | ||
description: Blank line after open tag in table syntax | ||
modified: 20240622145056299 | ||
tags: $:/tags/wiki-test-spec | ||
title: TestCases/HTML/OpenTagBlankLineInTableSyntax | ||
type: text/vnd.tiddlywiki-multiple | ||
|
||
title: Narrative | ||
|
||
A blank line after an open html tag cannot work when used inside table syntax since each row of a table must be all on one line | ||
+ | ||
title: Output | ||
|
||
|For a blank line after open tag|<div> | ||
|
||
* list is recognised | ||
* but the surrounding table row is not | ||
</div>| | ||
+ | ||
title: ExpectedResult | ||
|
||
<p>|For a blank line after open tag|<div><ul><li>list is recognised</li><li>but the surrounding table row is not</li></ul></div>|</p> |
34 changes: 34 additions & 0 deletions
34
editions/tw5.com/tiddlers/testcases/HTML/OpenTagNoBlankLine.tid
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,34 @@ | ||
created: 20240622143533021 | ||
description: No blank line after open tag | ||
modified: 20240622145145440 | ||
tags: $:/tags/wiki-test-spec | ||
title: TestCases/HTML/OpenTagNoBlankLine | ||
type: text/vnd.tiddlywiki-multiple | ||
|
||
title: Narrative | ||
|
||
Block mode punctuation is not recognised when HTML open tag is not followed by a blank line | ||
+ | ||
title: Output | ||
|
||
<div> | ||
* Open tag without a blank line means | ||
* block mode punctuation (i.e. this list) will | ||
* NOT be recognised. | ||
|
||
Paragraphs are only recognised in block mode. Even with blank lines, new paragraphs are not recognised. | ||
|
||
This also is not a new paragraph. | ||
</div> | ||
+ | ||
title: ExpectedResult | ||
|
||
<p><div> | ||
* Open tag without a blank line means | ||
* block mode punctuation (i.e. this list) will | ||
* NOT be recognised. | ||
|
||
Paragraphs are only recognised in block mode. Even with blank lines, new paragraphs are not recognised. | ||
|
||
This also is not a new paragraph. | ||
</div></p> |
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