@@ -434,7 +434,10 @@ include = try $ do
434434 string ".. include::"
435435 skipMany spaceChar
436436 f <- trim <$> anyLine
437− -- TODO options
437+ fields <- many $ rawFieldListItem 3
438+ -- options
439+ let (startLine :: Maybe Int) = lookup "start-line" fields >>= safeRead
440+ let (endLine :: Maybe Int) = lookup "end-line" fields >>= safeRead
438441 guard $ not (null f)
439442 oldPos <- getPosition
440443 oldInput <- getInput
@@ -448,8 +451,11 @@ include = try $ do
448451 Left _e -> do
449452 lift $ warning $ "Could not read include file " ++ f ++ "."
450453 return ""
454+ let contents' = unlines $ maybe id (drop . (\x -> x - 1)) startLine
455+ $ maybe id (take . (\x -> x - 1)) endLine
456+ $ lines contents
451457 setPosition $ newPos f 1 1
452− setInput contents
458+ setInput contents'
453459 bs <- optional blanklines >> (mconcat <$> many block)
454460 setInput oldInput
455461 setPosition oldPos