Fix id parsing for atx markdown headers

isAtxHeader() parses out the id and the title into the appropriate
variables.  The subsequent call to extractTitleId() would then have the
trimmed title (without the id ref) as input, and hence always set id to
be empty.