fixed '#' character in block bug

Fixed a bug where using the ‘#’ character in a block would break the
layout.