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:
John MacFarlane
2026-08-17 10:01:58 -07:00
parent d354db9b04
commit 5f37c6781b
2 changed files with 16 additions and 3 deletions
-3
View File
@@ -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
+16
View File
@@ -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>
```