summaryrefslogtreecommitdiff
path: root/src/creole_test_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/creole_test_main.c')
-rw-r--r--src/creole_test_main.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/creole_test_main.c b/src/creole_test_main.c
index 334ba43..bae144b 100644
--- a/src/creole_test_main.c
+++ b/src/creole_test_main.c
@@ -136,6 +136,16 @@ struct {
.output = "<p>Bold and italics should <em>be\nable</em> to cross lines.</p>"
},
{
+ .name = "Emphasised URL",
+ .input = "//https://example.com//",
+ .output = "<p><em><a href=\"https://example.com\">https://example.com</a></em></p>"
+ },
+ { // I don't know that this is necessarily //correct// behavior... Let's document it anyways
+ .name = "Emphasised URL ending in slash",
+ .input = "//https://example.com///",
+ .output = "<p><em><a href=\"https://example.com\">https://example.com</a></em>/</p>"
+ },
+ {
.name = "Emphasis does not cross paragraph boundaries",
.input = "This text should //not\n\nbe emphased// as it crosses a paragraph boundary.",
.output = "<p>This text should //not</p>"
@@ -152,11 +162,21 @@ struct {
"<em>this should be an italic text</em>.</p>"
},
{
+ .name = "Escaped emphasis",
+ .input = "I //love double ~// slashes//!",
+ .output = "<p>I <em>love double // slashes</em>!</p>"
+ },
+ {
.name = "Bold",
.input = "**Strong**",
.output = "<p><strong>Strong</strong></p>"
},
{
+ .name = "Escaped bold",
+ .input = "**Strong ~** still strong**",
+ .output = "<p><strong>Strong ** still strong</strong></p>"
+ },
+ {
.name = "Nested bold/italic",
.input = "//**Strong and emphasized**//",
.output = "<p><em><strong>Strong and emphasized</strong></em></p>"