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

ilib-loctool-regex: Add escaping support #75

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Conversation

ehoogerbeets
Copy link
Contributor

@ehoogerbeets ehoogerbeets commented Mar 6, 2025

  • add a new setting escapeStyle to each expression
  • when strings are extracted for files that match that expression, the named escape style is applied as an unescaper

- Now unescapes strings that it extracts according to the
  escape style set into each mapping. This allows you to do different
  escaping for different types of files.
- Each mapping maps a particular set of glob expressions to settings
  for files of a particular type. These settings can now contains
  an escapeStyle parameter that does unescaping in the manner of
  the named programming language.
- will deny a README file that mentions the debugger. Now only
  denies it if it finds "debugger;" with the semi-colon and only
  if the file path ends with ".js"
@ehoogerbeets ehoogerbeets self-assigned this Mar 6, 2025
Copy link

changeset-bot bot commented Mar 6, 2025

🦋 Changeset detected

Latest commit: 49c1a9e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
ilib-loctool-regex Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

github-actions bot commented Mar 6, 2025

Jest Code Coverage

Code Coverage for changed files • (0%) 
File% Stmts% Branch% Funcs% LinesUncovered Line #s
report-only-changed-files is enabled. No files were changed in this commit :)
Title Lines Statements Branches Functions
loctool Coverage: 81%
81.53% (6640/8144) 74.26% (3374/4543) 72.78% (757/1040)
Title Tests Skipped Failures Errors Time
loctool 2296 81 💤 0 ❌ 0 🔥 57.173s ⏱️

- The reason is that in many programming languages, some types of
  strings are unescaped differently than others, even within the
  same programming language. eg. double- vs. single-quoted strings
  in PHP
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.

1 participant