Whole file

t3rn0/ast-comments

The author described this change as fix: spaces at the end of a comment does not change its inlined value. It counts as a record because the check below fails on the code as it stood at 9db725c22 and passes on ed488312a, with nothing else changed between the two runs.

Fix saved2023-09-23
Sharing licenceMIT · LICENSE
Change size+1 1

What the code was meant to do, written into the code itself as a save note

fix: spaces at the end of a comment does not change its inlined value

The change

3939 end_lineno, end_col_offset = t.end
4040 c = Comment(
4141 value=t.string,
42- inline=t.string != t.line.strip("\n").strip(" "),
42+ inline=t.string != t.line.strip("\n").lstrip(" "),
4343 lineno=lineno,
4444 col_offset=col_offset,
4545 end_lineno=end_lineno,

The check that tells the two apart

failpass·test_parse.py::test_comment_ends_with_space

Check file test_parse.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.

Origin and history

The code before it9db725c22bade2680147d760bfc2ff6e75d9a5f5
Broken version dated2023-06-24
Moduleast_comments
Units changed_enrich
Fingerprint8fd223012317ad44
Checked2026-08-18 by goldset/0.1

Every field above is generated by our program. None of it is written by hand.

Other bugs found in t3rn0/ast-comments