Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Adjacent Junks are incorrectly merged

Open
#128 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
localization

Research direction

Start by comparing the syntax parser's Junk handling with fluent.syntax/tests/syntax/fixtures_reference/comments.ftl and fluent.syntax/tests/syntax/fixtures_structure/unclosed.ftl. Run the syntax tests and adjust the boundary behavior so unclosed.ftl produces 4 Junks while the comments fixture continues to split correctly.

Written by the indexing model from the issue text.

Description

Per upstream issue 296, each Junk should end whenever a new line begins with a single character that could be the start of a new Entry (i.e. ^[-#a-zA-Z]). This is working correctly only in the case of potential Comment entries (see comments.ftl where the leading # starts a new Junk) but is incorrect for all other cases such as possible Messages and Terms (see unclosed.ftl which should result in 4 Junks but instead merges 6 junk_lines into 1 Junk).

Note the JavaScript implementation has the same bug.

Dominant language
Python
Stars
245
Forks
30
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from projectfluent/python-fluent

All issues in projectfluent/python-fluent

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.