Skip to content

Follow-ups from #161: CRLF/BOM # headers aren't detected, a stacked header starting with text isn't merged, and vi: prose at the top counts as a modeline #162

Closed

Description

@Shinrai

Minor follow-ups to #161; none of them loses text.

  1. CRLF and BOM line-comment (#) headers aren't detected. In the line-comment header regex . doesn't match \r, and a leading BOM breaks the ^ anchor, so an existing # header in a CRLF or BOM file isn't found and a new header is inserted above it. This is older than fix(headers): text inside an existing header that isn't a header field moves to its own block below the header, never deleted (#160) #161. CRLF block-comment headers work.
  2. A stacked header whose first line is description text, not @Project:, is no longer merged. fix(headers): text inside an existing header that isn't a header field moves to its own block below the header, never deleted (#160) #161 only absorbs a following comment whose first non-empty line is @Project:, so it stays below as an old header comment with stale fields. Nothing is lost.
  3. #\tvi: is the editor we use as the first line of a # header counts as a modeline and stays above the header. Tighten the modeline match to the real vi:/vim:/ex: grammar (set ...: or opt=val pairs).

Activity

  1. added
    type: bug
    priority: low
    area: core
    status: not started
    on Oct 31, 2026
  2. added
    status: implemented
    and removed
    status: not started
    on Nov 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: corepriority: lowstatus: implementedtype: bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions