Hi,

xparse's \NewDocumentCommand doesn't seem to play well with hyperref
bookmarks.  In this code

\listfiles
\documentclass{article}
\usepackage{xparse}
\usepackage{hyperref}
\begin{document}
\NewDocumentCommand{\fooa}{}{FooA}
\DeclareExpandableDocumentCommand{\foob}{m}{FooB}
\section{aaa \fooa\ bbb \foob{} ccc}
\end{document}

text from macro \fooa doesn't show up in the bookmark.  Fortunately, it
works at least for macro \foob.

Is that expected behaviour?  Would it be possible to make
\NewDocumentCommand macros work with hyperref bookmarks?  I'd prefer
using \NewDocumentCommand macros because of the mandatory argument of
\DeclareExpandableDocumentCommand macros which I don't need in my context.

Best regards,
Stephan Hennig