Repository navigation
Split a copyright at NEL, LINE SEPARATOR and PARAGRAPH SEPARATOR too [patch] - #56
Merged
Merged
Conversation
…[patch] WriteFileHeader split the copyright only at CR, LF and CRLF. The C# lexer also ends a line at U+0085, U+2028 and U+2029, so text after one of them left the // comment and the generated file failed to compile. The header is now split at all six terminators. Fixes #39 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017vfJW67iMrjvYtnNY3p2qt
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Fixes #39
What changed
GeneratorBase.WriteFileHeaderadds a//comment marker to each line of the copyright text. It split the text into lines only at CR, LF and CRLF. The C# lexer also ends a line at U+0085 (NEL), U+2028 (LINE SEPARATOR) and U+2029 (PARAGRAPH SEPARATOR). Any text after one of those characters fell outside the comment, so the generated file did not compile (CS1003/CS1002).CopyrightLineBreaksnow contains all six terminators. CRLF stays first, so it still counts as one line break, not two. The doc comments now list the six terminators.Tests
AMultiLineCopyrightIsCommentedOnEveryLinegains a DataRow for each of U+0085, U+2028 and U+2029. The test checks the exact header text, and that the output parses with no diagnostics.With the
GeneratorBase.cschange reverted, the three new rows fail. With it, the full suite passes (net10.0, Linux).ktsu-dev/CodeBlocker#152 fixes the same class of bug in CodeBlocker's
WriteAutoGeneratedHeader.Generated by Claude Code