Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify Compile.ps1 Handling of Xaml to Improve Maintainability #2701

Merged

Conversation

ruxunderscore
Copy link
Contributor

Pull Request

Title

Improve Xaml Compiling by implementing a here-string, and improved the ingesting of Xaml through Get-Content.

Type of Change

  • New feature
  • Bug fix
  • Documentation update
  • Refactoring
  • Hotfix
  • Security patch
  • UI/UX improvement

Description

A here-string allows you to declare a block of text. This allows the Xaml to processed as a string without the need for escaping quotes within the Xaml. Also implemented the -Raw argument with Get-Content to ingest the Xampl as a single string and preserve line breaks.

Testing

Tested Compile.ps1 and running of the winutil.ps1 script.

Impact

This method should preserve syntax highlighting in the generated script and make it easier to read and maintain. The single quotes in the XAML content won't need to be escaped, as the here-string handles that automatically.

Issue related to PR

N/A

Additional Information

N/A

Checklist

  • My code adheres to the coding and style guidelines of the project.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no errors/warnings/merge conflicts.

- Implemented here-strings to improve syntax highlighting and readability after Compile.ps1 is run.
- Added comments to help explain changes.
@ruxunderscore
Copy link
Contributor Author

Merged commit with changes to Compile.ps1.

Copy link
Owner

@ChrisTitusTech ChrisTitusTech left a comment

Choose a reason for hiding this comment

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

Works great!

@ChrisTitusTech ChrisTitusTech merged commit 0066875 into ChrisTitusTech:main Sep 10, 2024
1 check passed
@ChrisTitusTech ChrisTitusTech added the skip-changelog Skip Change Logs label Sep 10, 2024
ChrisTitusTech added a commit that referenced this pull request Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip-changelog Skip Change Logs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants