aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorla-ninpre <leobrekalini@gmail.com>2020-11-16 19:45:19 +0300
committerla-ninpre <leobrekalini@gmail.com>2020-11-16 19:45:19 +0300
commit2d26d28c8f891bae27bf075b443b1e82185e4a37 (patch)
treec8e136490e16f2388e5927f9a54738978b0987fb /tests
parent767dc7f6954a66e187e5eefc36c21868048e04fc (diff)
downloadtg2md-2d26d28c8f891bae27bf075b443b1e82185e4a37.tar.gz
tg2md-2d26d28c8f891bae27bf075b443b1e82185e4a37.zip
fix formatted text parsing
earlier, situations when there were strings like 'bold\ntext\n' that needed to be treated as bold text were converted in a wrong way (e.g. like '**bold\ntext\n**', which is breaking markup because of newline characters before closing asterisks), but now it's kind of fixed. also there's now support for emails and <pre> blocks.
Diffstat (limited to 'tests')
-rw-r--r--tests/formatted_posts/2020-11-12-10.md14
-rw-r--r--tests/formatted_posts/2020-11-12-11.md11
-rw-r--r--tests/formatted_posts/2020-11-12-13.md11
-rw-r--r--tests/formatted_posts/2020-11-12-14.md12
-rw-r--r--tests/formatted_posts/2020-11-12-15.md8
-rw-r--r--tests/formatted_posts/2020-11-12-2.md8
-rw-r--r--tests/formatted_posts/2020-11-12-3.md10
-rw-r--r--tests/formatted_posts/2020-11-12-4.md10
-rw-r--r--tests/formatted_posts/2020-11-12-5.md16
-rw-r--r--tests/formatted_posts/2020-11-12-7.md11
-rw-r--r--tests/formatted_posts/2020-11-12-8.md11
-rw-r--r--tests/formatted_posts/2020-11-12-9.md10
12 files changed, 132 insertions, 0 deletions
diff --git a/tests/formatted_posts/2020-11-12-10.md b/tests/formatted_posts/2020-11-12-10.md
new file mode 100644
index 0000000..dab9ba4
--- /dev/null
+++ b/tests/formatted_posts/2020-11-12-10.md
@@ -0,0 +1,14 @@
+---
+title: 10
+date: 2020-11-12 14:11:35
+tag: None
+layout: post
+---
+
+**bold** in text
+**bold below**
+
+normal text
+
+**bold with one line gap**
+normal text
diff --git a/tests/formatted_posts/2020-11-12-11.md b/tests/formatted_posts/2020-11-12-11.md
new file mode 100644
index 0000000..2e4b2c2
--- /dev/null
+++ b/tests/formatted_posts/2020-11-12-11.md
@@ -0,0 +1,11 @@
+---
+title: 11
+date: 2020-11-12 14:34:47
+tag: None
+layout: post
+---
+
+**multiline
+bold
+
+text**
diff --git a/tests/formatted_posts/2020-11-12-13.md b/tests/formatted_posts/2020-11-12-13.md
new file mode 100644
index 0000000..01fa3c6
--- /dev/null
+++ b/tests/formatted_posts/2020-11-12-13.md
@@ -0,0 +1,11 @@
+---
+title: 13
+date: 2020-11-12 14:45:43
+tag: None
+layout: post
+---
+
+`monospace with one baktick`
+
+```multiline
+monospace```
diff --git a/tests/formatted_posts/2020-11-12-14.md b/tests/formatted_posts/2020-11-12-14.md
new file mode 100644
index 0000000..092be7d
--- /dev/null
+++ b/tests/formatted_posts/2020-11-12-14.md
@@ -0,0 +1,12 @@
+---
+title: 14
+date: 2020-11-12 14:48:48
+tag: None
+layout: post
+---
+
+[text link](http://example.com/)
+
+<example.com>
+
+<example@example.com>
diff --git a/tests/formatted_posts/2020-11-12-15.md b/tests/formatted_posts/2020-11-12-15.md
new file mode 100644
index 0000000..b8e65e0
--- /dev/null
+++ b/tests/formatted_posts/2020-11-12-15.md
@@ -0,0 +1,8 @@
+---
+title: 15
+date: 2020-11-12 15:05:32
+tag: None
+layout: post
+---
+
+*bold italic*
diff --git a/tests/formatted_posts/2020-11-12-2.md b/tests/formatted_posts/2020-11-12-2.md
new file mode 100644
index 0000000..ded2627
--- /dev/null
+++ b/tests/formatted_posts/2020-11-12-2.md
@@ -0,0 +1,8 @@
+---
+title: 2
+date: 2020-11-12 12:54:07
+tag: None
+layout: post
+---
+
+test text post
diff --git a/tests/formatted_posts/2020-11-12-3.md b/tests/formatted_posts/2020-11-12-3.md
new file mode 100644
index 0000000..f9bfe3d
--- /dev/null
+++ b/tests/formatted_posts/2020-11-12-3.md
@@ -0,0 +1,10 @@
+---
+title: 3
+date: 2020-11-12 12:57:31
+tag: None
+layout: post
+---
+
+![image](/photos/photo_1@12-11-2020_12-57-31.jpg)
+
+
diff --git a/tests/formatted_posts/2020-11-12-4.md b/tests/formatted_posts/2020-11-12-4.md
new file mode 100644
index 0000000..8beb106
--- /dev/null
+++ b/tests/formatted_posts/2020-11-12-4.md
@@ -0,0 +1,10 @@
+---
+title: 4
+date: 2020-11-12 12:57:40
+tag: None
+layout: post
+---
+
+![image](/photos/photo_1@12-11-2020_12-57-31.jpg)
+
+photo with text
diff --git a/tests/formatted_posts/2020-11-12-5.md b/tests/formatted_posts/2020-11-12-5.md
new file mode 100644
index 0000000..13e734e
--- /dev/null
+++ b/tests/formatted_posts/2020-11-12-5.md
@@ -0,0 +1,16 @@
+---
+title: 5
+date: 2020-11-12 12:58:18
+tag: None
+layout: post
+---
+
+*italic*
+
+**bold**
+
+<u>underline</u>
+
+<s>strikethrough</s>
+
+```monospace```
diff --git a/tests/formatted_posts/2020-11-12-7.md b/tests/formatted_posts/2020-11-12-7.md
new file mode 100644
index 0000000..5a9e6ec
--- /dev/null
+++ b/tests/formatted_posts/2020-11-12-7.md
@@ -0,0 +1,11 @@
+---
+title: 7
+date: 2020-11-12 13:01:05
+tag: None
+layout: post
+---
+
+
+<audio controls>
+ <source src="/files/audio_1@12-11-2020_13-01-05.ogg" type="audio/ogg">
+ </audio>
diff --git a/tests/formatted_posts/2020-11-12-8.md b/tests/formatted_posts/2020-11-12-8.md
new file mode 100644
index 0000000..0b30a03
--- /dev/null
+++ b/tests/formatted_posts/2020-11-12-8.md
@@ -0,0 +1,11 @@
+---
+title: 8
+date: 2020-11-12 13:02:35
+tag: None
+layout: post
+---
+
+
+<audio controls>
+ <source src="/files/test-sound.ogg" type="audio/x-vorbis+ogg">
+ </audio>
diff --git a/tests/formatted_posts/2020-11-12-9.md b/tests/formatted_posts/2020-11-12-9.md
new file mode 100644
index 0000000..cbf1a9f
--- /dev/null
+++ b/tests/formatted_posts/2020-11-12-9.md
@@ -0,0 +1,10 @@
+---
+title: 9
+date: 2020-11-12 13:43:23
+tag: None
+layout: post
+---
+
+*italic* in text
+
+*italic on whole line*