mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-11 00:58:31 +02:00
Add testing for increasing Headings on Markdown export
This commit is contained in:
parent
1d3c9daafe
commit
f1a83a51ed
3 changed files with 106 additions and 0 deletions
11
features/data/configs/markdown-headings-335.yaml
Normal file
11
features/data/configs/markdown-headings-335.yaml
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
default_hour: 9
|
||||||
|
default_minute: 0
|
||||||
|
editor: ''
|
||||||
|
encrypt: false
|
||||||
|
highlight: true
|
||||||
|
journals:
|
||||||
|
default: features/journals/markdown-headings-335.journal
|
||||||
|
linewrap: 80
|
||||||
|
password: ''
|
||||||
|
tagsymbols: '@'
|
||||||
|
timeformat: '%Y-%m-%d %H:%M'
|
42
features/data/journals/markdown-headings-335.journal
Normal file
42
features/data/journals/markdown-headings-335.journal
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
[2015-04-14 13:23] Heading Test
|
||||||
|
|
||||||
|
H1-1
|
||||||
|
=
|
||||||
|
|
||||||
|
H1-2
|
||||||
|
===
|
||||||
|
|
||||||
|
H1-3
|
||||||
|
============================
|
||||||
|
|
||||||
|
H2-1
|
||||||
|
-
|
||||||
|
|
||||||
|
H2-2
|
||||||
|
---
|
||||||
|
|
||||||
|
H2-3
|
||||||
|
----------------------------------
|
||||||
|
|
||||||
|
Horizontal Rules (ignore)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
===
|
||||||
|
|
||||||
|
# ATX H1
|
||||||
|
|
||||||
|
## ATX H2
|
||||||
|
|
||||||
|
### ATX H3
|
||||||
|
|
||||||
|
#### ATX H4
|
||||||
|
|
||||||
|
##### ATX H5
|
||||||
|
|
||||||
|
###### ATX H6
|
||||||
|
|
||||||
|
Stuff
|
||||||
|
|
||||||
|
More stuff
|
||||||
|
more stuff again
|
|
@ -26,3 +26,56 @@ Feature: Exporting a Journal
|
||||||
Then we should get no error
|
Then we should get no error
|
||||||
and the output should be parsable as json
|
and the output should be parsable as json
|
||||||
and the json output should contain entries.0.uuid = "4BB1F46946AD439996C9B59DE7C4DDC1"
|
and the json output should contain entries.0.uuid = "4BB1F46946AD439996C9B59DE7C4DDC1"
|
||||||
|
|
||||||
|
Scenario: Increasing Headings on Markdown export
|
||||||
|
Given we use the config "markdown-headings-335.yaml"
|
||||||
|
When we run "jrnl --export markdown"
|
||||||
|
Then we should get error
|
||||||
|
"""
|
||||||
|
WARNING: Headings increased past H6 on export - 2015-04-14 13:23 Heading Test
|
||||||
|
"""
|
||||||
|
and the output should be
|
||||||
|
"""
|
||||||
|
2015
|
||||||
|
====
|
||||||
|
|
||||||
|
April
|
||||||
|
-----
|
||||||
|
|
||||||
|
### 2015-04-14 13:23 Heading Test
|
||||||
|
|
||||||
|
#### H1-1
|
||||||
|
|
||||||
|
#### H1-2
|
||||||
|
|
||||||
|
#### H1-3
|
||||||
|
|
||||||
|
##### H2-1
|
||||||
|
|
||||||
|
##### H2-2
|
||||||
|
|
||||||
|
##### H2-3
|
||||||
|
|
||||||
|
Horizontal Rules (ignore)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
===
|
||||||
|
|
||||||
|
#### ATX H1
|
||||||
|
|
||||||
|
##### ATX H2
|
||||||
|
|
||||||
|
###### ATX H3
|
||||||
|
|
||||||
|
####### ATX H4
|
||||||
|
|
||||||
|
######## ATX H5
|
||||||
|
|
||||||
|
######### ATX H6
|
||||||
|
|
||||||
|
Stuff
|
||||||
|
|
||||||
|
More stuff
|
||||||
|
more stuff agains
|
||||||
|
"""
|
||||||
|
|
Loading…
Add table
Reference in a new issue