Fix comment handling CPP special case

pull/1/head
Lennart Spitzner 2016-08-06 14:58:47 +02:00
parent a1e012eb40
commit b4f749ea0c
1 changed files with 5 additions and 2 deletions

View File

@ -1345,9 +1345,12 @@ layoutBriDocM = \case
Nothing -> return ()
Just posts -> do
posts `forM_` \( ExactPrint.Types.Comment comment _ _
, ExactPrint.Types.DP (x, y)
, ExactPrint.Types.DP (y, x)
) -> do
layoutMoveToCommentPos x y
-- evil hack for CPP:
case comment of
('#':_) -> layoutMoveToCommentPos y (-999)
_ -> layoutMoveToCommentPos y x
-- fixedX <- fixMoveToLineByIsNewline x
-- replicateM_ fixedX layoutWriteNewline
-- layoutMoveToIndentCol y