mirror of
https://github.com/jgm/pandoc.git
synced 2026-09-01 15:38:09 +08:00
Org reader: require abstract environment to use lowercase
This commit is contained in:
@@ -191,8 +191,11 @@ orgBlock = try $ do
|
||||
"quote" -> parseBlockLines (fmap B.blockQuote)
|
||||
"verse" -> verseBlock
|
||||
"src" -> codeBlock blockAttrs
|
||||
"abstract"-> metadataBlock
|
||||
_ -> parseBlockLines $
|
||||
_ ->
|
||||
-- case-sensitive checks
|
||||
case blkType of
|
||||
"abstract" -> metadataBlock
|
||||
_ -> parseBlockLines $
|
||||
let (ident, classes, kv) = attrFromBlockAttributes blockAttrs
|
||||
in fmap $ B.divWith (ident, classes ++ [blkType], kv)
|
||||
where
|
||||
|
||||
@@ -37,3 +37,15 @@ abstract: |
|
||||
|
||||
Main text
|
||||
```
|
||||
|
||||
Uppercase ABSTRACT environment is not moved to metadata.
|
||||
```
|
||||
% pandoc --from=org --to=markdown --standalone
|
||||
#+BEGIN_ABSTRACT
|
||||
Some text.
|
||||
#+END_ABSTRACT
|
||||
^D
|
||||
::: ABSTRACT
|
||||
Some text.
|
||||
:::
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user