Some users on the main Tex-chatroom of this site (one using TeX Live) have reported that this (or similar) code IS outputting clickable URLs for them, while for me (using TeXShop), it ISN'T ... What could be the problem?
MWE
\documentclass[a4paper]{article}
\usepackage{xparse, hyperref}
\ExplSyntaxOn
\cs_set_eq:NN
\IfEmptyTF
\tl_if_blank:nTF
\ExplSyntaxOff
\NewDocumentEnvironment {mainentry} { m m m } {%
\IfEmptyTF{#3}{
First argument returns #1 NO
}{%
Second argument returns #2 YES
}%
}{%
\href{http://a.beautiful.url/?searchid=#1}{Click on me}%
}
\begin{document}
A) There should be a YES here. OK.
\begin{mainentry}{
first
}{
second
}{
third
}
\end{mainentry}
B) There should be a NO here. OK.
\begin{mainentry}{
first
}{
second
}{
%
}
\end{mainentry}
\end{document}
xinttoolsprovides macros for stripping spaces at either end of input. Documentation is as part ofxint(texdoc xintand go toMacros of the xinttools package). – Oct 09 '17 at 12:12