probably should strip leading whitespace:

    {%- if title %}