Org reader: require abstract environment to use lowercase

This commit is contained in:
Albert Krewinkel
2023-04-01 17:38:46 +02:00
parent 509cb9b8fe
commit ef16a88cde
2 changed files with 17 additions and 2 deletions
+5 -2
View File
@@ -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
+12
View File
@@ -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.
:::
```