RST reader: apply .. class::
directly to following Header.
rather than creating a surrounding Div. Closes #6699.
This commit is contained in:
parent
6119125a8b
commit
188c444990
2 changed files with 19 additions and 1 deletions
|
@ -758,7 +758,12 @@ directive' = do
|
|||
children <- case body of
|
||||
"" -> block
|
||||
_ -> parseFromString' parseBlocks body'
|
||||
return $ B.divWith attrs children
|
||||
return $
|
||||
case B.toList children of
|
||||
[Header lev attrs' ils]
|
||||
| T.null body -> -- # see #6699
|
||||
B.headerWith (attrs' <> attrs) lev (B.fromList ils)
|
||||
_ -> B.divWith attrs children
|
||||
other -> do
|
||||
pos <- getPosition
|
||||
logMessage $ SkippedContent (".. " <> other) pos
|
||||
|
|
13
test/command/6699.md
Normal file
13
test/command/6699.md
Normal file
|
@ -0,0 +1,13 @@
|
|||
```
|
||||
% pandoc -f rst -t native
|
||||
.. class:: allowframebreaks
|
||||
|
||||
title
|
||||
-----
|
||||
|
||||
text
|
||||
^D
|
||||
[Header 1 ("title",["allowframebreaks"],[]) [Str "title"]
|
||||
,Para [Str "text"]]
|
||||
```
|
||||
|
Loading…
Add table
Reference in a new issue