Skip to content

Validate Unicode direction override markers in documentation comments - #16812

Open
msooseth wants to merge 4 commits into
developfrom
fix-bidi-doc-comments
Open

Validate Unicode direction override markers in documentation comments#16812
msooseth wants to merge 4 commits into
developfrom
fix-bidi-doc-comments

Conversation

@msooseth

Copy link
Copy Markdown
Contributor

Description

I tried to make this MINIMAL and SANE and SIMPLE. I really hope this can be reviewed within reasonable time.

Checklist

AI Disclosure

  • No AI tools were used
  • AI tools were used (details below)

An AI tool discovered it, and proposed a solution, I reviewed it and updated it, and reviewed it again.

Update changelog

More const

Less const

Less const

Update const
@blishko

blishko commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

@msooseth, can you link to the issue this is fixing?

@msooseth

msooseth commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

This is trying to fix an issue that our LLM skill discovered regarding parsing of comments. I tried reviewing it and making it sane. There is no issue that I filed but the test cases are showing where things would go wrong.

Comment on lines +4 to +5
// PDF
/// underflow ‬

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a multiline comment test case, for each of these (// and ///) where you open an override on one line and close it on the next?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also /** */

Comment thread Changelog.md

Bugfixes:
* NatSpec: Disallow `@return` tag in event documentation.
* Parser: Detect unbalanced Unicode direction override markers (e.g. `U+202E`) in documentation comments (`///` and `/** */`)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Parser: Detect unbalanced Unicode direction override markers (e.g. `U+202E`) in documentation comments (`///` and `/** */`)
* Scanner: Detect unbalanced Unicode direction override markers (e.g. `U+202E`) in documentation comments (`///` and `/** */`)

Comment on lines +4 to +5
// PDF
/// underflow ‬

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also /** */

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants