Skip to content

Fix reported issues#12

Merged
Wyvest merged 2 commits into
Polyfrost:mainfrom
Deftu:main
Jul 31, 2025
Merged

Fix reported issues#12
Wyvest merged 2 commits into
Polyfrost:mainfrom
Deftu:main

Conversation

@Deftu
Copy link
Copy Markdown
Contributor

@Deftu Deftu commented Jul 30, 2025

Description

  • Fix //$$ automatically being appended to newlines undesirably
  • Fix syntax highlighting occasionally missing the last scope when highlighting non-if directives (labeling an endif as incorrect despite having an attached if, else, elseif, etc.)

Related Issue(s)

N/A

How to test

N/A

Release Notes

- Fix `//$$ ` automatically being appended to newlines undesirably
- Fix syntax highlighting occasionally missing the last scope when highlighting non-if directives (labeling an endif as incorrect despite having an attached if, else, elseif, etc.)

Documentation

N/A

@Deftu Deftu requested a review from Copilot July 30, 2025 22:19
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes two specific issues: preventing automatic appending of //$$ to newlines when unnecessary, and correcting syntax highlighting for non-if directives to ensure proper scope matching.

  • Fixed logic in PreprocessorNewLineHandler to only insert preprocessor markers when inside conditional blocks
  • Refactored syntax highlighting to use proper visitor pattern for complete scope analysis
  • Reorganized plugin configuration to support optional Java dependency and Kotlin K2 mode

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/main/resources/META-INF/plugin.xml Moved Java-specific extensions to separate config file and made Java dependency optional
src/main/resources/META-INF/kotlin-plugin.xml Reorganized Kotlin K2 support declaration to top of file
src/main/resources/META-INF/java-plugin.xml New config file containing Java-specific plugin extensions
src/main/kotlin/org/polyfrost/intelliprocessor/editor/PreprocessorSyntaxHighlight.kt Changed to use recursive visitor pattern for proper element traversal
src/main/kotlin/org/polyfrost/intelliprocessor/editor/PreprocessorNewLineHandler.kt Added early return when no conditional blocks found and fixed block detection logic
gradle.properties Version bump to 4.1.0

@Wyvest Wyvest merged commit aeec5de into Polyfrost:main Jul 31, 2025
1 check passed
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