@@ -185,7 +185,8 @@ pushBlock = \case
185 Header lvl attr inlns -> pushViaConstructor "Header" lvl inlns (LuaAttr attr)
185 Header lvl attr inlns -> pushViaConstructor "Header" lvl inlns (LuaAttr attr)
186 HorizontalRule -> pushViaConstructor "HorizontalRule"
186 HorizontalRule -> pushViaConstructor "HorizontalRule"
187 LineBlock blcks -> pushViaConstructor "LineBlock" blcks
187 LineBlock blcks -> pushViaConstructor "LineBlock" blcks
188− OrderedList lstAttr list -> pushViaConstructor "OrderedList" list lstAttr
188+ OrderedList lstAttr list -> pushViaConstructor "OrderedList" list
189+ (LuaListAttributes lstAttr)
189 Null -> pushViaConstructor "Null"
190 Null -> pushViaConstructor "Null"
190 Para blcks -> pushViaConstructor "Para" blcks
191 Para blcks -> pushViaConstructor "Para" blcks
191 Plain blcks -> pushViaConstructor "Plain" blcks
192 Plain blcks -> pushViaConstructor "Plain" blcks
@@ -207,7 +208,9 @@ peekBlock idx = defineHowTo "get Block value" $ do
207 <$> elementContent
208 <$> elementContent
208 "HorizontalRule" -> return HorizontalRule
209 "HorizontalRule" -> return HorizontalRule
209 "LineBlock" -> LineBlock <$> elementContent
210 "LineBlock" -> LineBlock <$> elementContent
211+ "OrderedList" -> (\(LuaListAttributes lstAttr, lst) ->
212+ OrderedList lstAttr lst)
210− "OrderedList" -> uncurry OrderedList <$> elementContent
213+ <$> elementContent
211 "Null" -> return Null
214 "Null" -> return Null
212 "Para" -> Para <$> elementContent
215 "Para" -> Para <$> elementContent
213 "Plain" -> Plain <$> elementContent
216 "Plain" -> Plain <$> elementContent
@@ -289,6 +292,17 @@ instance Pushable LuaAttr where
289instance Peekable LuaAttr where
292instance Peekable LuaAttr where
290 peek idx = defineHowTo "get Attr value" (LuaAttr <$> Lua.peek idx)
293 peek idx = defineHowTo "get Attr value" (LuaAttr <$> Lua.peek idx)
295+-- | Wrapper for ListAttributes
296+newtype LuaListAttributes = LuaListAttributes ListAttributes
298+instance Pushable LuaListAttributes where
299+ push (LuaListAttributes (start, style, delimiter)) =
300+ pushViaConstructor "ListAttributes" start style delimiter
302+instance Peekable LuaListAttributes where
303+ peek = defineHowTo "get ListAttributes value" .
304+ fmap LuaListAttributes . Lua.peek
293-- Hierarchical elements
307-- Hierarchical elements