Add tests for lists in code blocks and code blocks in lists

https://github.com/kaushalmodi/ox-hugo/issues/57
master
Kaushal Modi 9 years ago
parent b277e6525d
commit 44cd8902be
  1. 40
      example-site/content-org/all-posts.org
  2. 18
      example-site/content/posts/list-has-src-block-but-no-list-syntax.md
  3. 22
      example-site/content/posts/list-has-src-block-with-list-syntax.md
  4. 10
      example-site/content/posts/src-block-outside-list-with-list-syntax.md

@ -352,6 +352,46 @@ property needs to be left *empty* instead of setting to =nil=!
#+BEGIN_SRC makefile
prefix = /dir/where/you/want/to/install/org # Default: /usr/share
#+END_SRC
** Source block with list syntax in a list :@fixme:upstream:
:PROPERTIES:
:EXPORT_DATE: 2017-08-01
:EXPORT_FILE_NAME: list-has-src-block-with-list-syntax
:END:
As of today (<2017-08-02 Wed>), an upstream bug in /Blackfriday/
([[https://github.com/russross/blackfriday/issues/239][Issue #239]]) causes fenced code blocks in lists to not render
correctly if they contain Markdown syntax lists.
Below is an example of such a case:
- List item 1
#+BEGIN_SRC md
- List item 1 in code block
- List item 2 in code block
#+END_SRC
- List item 2
- List item 3
** Source block without list syntax in a list
:PROPERTIES:
:EXPORT_DATE: 2017-08-01
:EXPORT_FILE_NAME: list-has-src-block-but-no-list-syntax
:END:
This case is not affected by /Blackfriday/ [[https://github.com/russross/blackfriday/issues/239][Issue #239]] as the fenced
code block does not have Markdown syntax lists.
- List item 1
#+BEGIN_SRC md
,*abc*
/def/
=def=
#+END_SRC
- List item 2
** Source block with list syntax but not in a list
:PROPERTIES:
:EXPORT_DATE: 2017-08-01
:EXPORT_FILE_NAME: src-block-outside-list-with-list-syntax
:END:
#+BEGIN_SRC md
- list 1
#+END_SRC
* Formatting :formatting:
** General
:PROPERTIES:

@ -0,0 +1,18 @@
+++
title = "Source block without list syntax in a list"
date = 2017-08-01
tags = []
draft = false
+++
This case is not affected by _Blackfriday_ [Issue #239](https://github.com/russross/blackfriday/issues/239) as the fenced
code block does not have Markdown syntax lists.
- List item 1
```md
*abc*
/def/
=def=
```
- List item 2

@ -0,0 +1,22 @@
+++
title = "Source block with list syntax in a list"
date = 2017-08-01
tags = ["upstream"]
categories = ["fixme"]
draft = false
+++
As of today (<span class="timestamp-wrapper"><span class="timestamp">&lt;2017-08-02 Wed&gt;</span></span>), an upstream bug in _Blackfriday_
([Issue #239](https://github.com/russross/blackfriday/issues/239)) causes fenced code blocks in lists to not render
correctly if they contain Markdown syntax lists.
Below is an example of such a case:
- List item 1
```md
- List item 1 in code block
- List item 2 in code block
```
- List item 2
- List item 3

@ -0,0 +1,10 @@
+++
title = "Source block with list syntax but not in a list"
date = 2017-08-01
tags = []
draft = false
+++
```md
- list 1
```
Loading…
Cancel
Save