I'm using the algorithmicx package and have created a custom block called \On, but even with the noend option for algpseudocode I get an extra blank line at the end of the block.
Here is a complete example:
\documentclass[a4paper]{report}
\usepackage{algorithmicx}
\usepackage{algorithm}
\usepackage[noend]{algpseudocode}
% Defines custom \On ... \EndOn block
\algblockdefx[ON]{On}{EndOn}
[2]{\textbf{on}~#1~\textbf{from}~#2~\textbf{do}}
\begin{document}
\begin{algorithm}
\begin{algorithmic}
\On{$foo$}{$bar$}
\State baz
\EndOn
\end{algorithmic}
\end{algorithm}
\end{document}
This is the result:

As you can see, I get an extra blank line. The predefined blocks like \If and \For, however, work as expected with the noend option.
I've read the documentation several times, but am still clueless in how I would fix this.
I'm using pdflatex from MacTeX (TeX Live) 2013.


