Skip to content

fix(web): count links with balanced destinations as visible prose #30

Description

@davidvornholt

Writing for the decider: a normal Markdown link whose URL contains balanced parentheses is counted as extra prose. That can put the day in a heavier activity bucket than the words the writer can see.

Evidence

The inline-link regex stops at the first closing parenthesis. A probe of [A quiet](https://example.com/foo_(bar)) produces plain text A quiet ) and a word count of 3 instead of 2. The behavior reproduces on PR #20’s pre-fix head, so the closing-fence repair did not introduce it.

Failure scenario

A journal entry links to an ordinary URL containing parentheses. The saved count includes a leftover ) as a word, and the archive can overstate that day’s activity.

Suggested verification

Handle balanced link destinations with the same Markdown grammar the renderer follows. Cover nested and escaped parentheses, optional titles, and punctuation adjacent to the link.

Found while verifying fixes in #20. It predates the fix commits, so the bounded repair pass cannot absorb it.

Activity

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

    deferred-findingDeferred review finding filed by a review-fix cycle

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions