Leaving blank line break simple macro but % terminating it fixes it. WTH is going on? I know one is suppose to use % BUT I can't have any blank lines in the macro without it complaining. A blank line essentially terminates the macro and TeX complains about a mixing }. Using etoolbox also produces the same problem so it seems it is an issue with xparse.
Is there any way to fix xparses package so I don't have to litter my code with %s?
\documentclass{book}
\usepackage{xparse, ifthen, etoolbox}
\DeclareDocumentCommand\iftb{m m G{\relax}}{\ifthenelse{\boolean{#1}}{#2}{#3}}
%\DeclareDocumentCommand\iftb{m m G{\relax}}{\ifbool{#1}{#2}{#3}}
\newboolean{A}\setboolean{A}{true}
\newboolean{B}\setboolean{B}{true}
\begin{document}
\iftb{A}{%
% <- remove all text on this line breaks macro (keep blank line)
\iftb{B}{%
asdffdsasdff
% <- same here
asdf
}
}
End
\end{document}