lukeed / lukeed/webpack-plugin-replace

Problem with escaping in 'values'

Open
#1 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
36
Forks
8
PR merge metrics
No merged PRs in 30d

Description

When writing a key with escaped special characters (e.g. 'fromCharCode\\(e\\)') it saves the key with one slash, so when script tries to find value with the two slashes it can't, and inserts undefined.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the escaped-key case described in the issue, using a key such as fromCharCode\\(e\\) and a value lookup containing the two slashes. Trace the handling of values from input through lookup; done means the saved key and lookup key remain consistent and the lookup no longer inserts undefined.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, webpack
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.