mirror of
https://github.com/jgm/pandoc.git
synced 2026-08-28 17:20:47 +08:00
Typst reader: 'block' should also be block-level.
See 185c29b4b2 which claims that
`block` can occur in inline contexts. I can no longer confirm
this and suspect that it may have been an unintended behavior
of earlier versions of typst, now fixed.
Closes #11814.
This commit is contained in:
@@ -575,9 +575,6 @@ inlineHandlers = M.fromList
|
||||
(if display then B.displayMath else B.math) . writeTeX <$> pMathMany body)
|
||||
,("pad", \_ _ fields -> -- ignore paddingy
|
||||
getField "body" fields >>= pWithContents pInlines)
|
||||
,("block", \_ mbident fields ->
|
||||
maybe id (\ident -> B.spanWith (ident, [], [])) mbident
|
||||
<$> (getField "body" fields >>= pWithContents pInlines))
|
||||
,("rotate", \_ _ fields -> do
|
||||
body <- getField "body" fields >>= pWithContents pInlines
|
||||
let kvs = case M.lookup "angle" fields of
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
```
|
||||
% pandoc -f typst
|
||||
#block[
|
||||
para 1
|
||||
]
|
||||
#block[
|
||||
para 2
|
||||
]
|
||||
#block[
|
||||
para 3
|
||||
]
|
||||
^D
|
||||
<p>para 1</p>
|
||||
<p>para 2</p>
|
||||
<p>para 3</p>
|
||||
```
|
||||
Reference in New Issue
Block a user