cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (CB-13496) the plugin config-file tag for iOS plist array behaves unnaturally.
Date Thu, 06 Sep 2018 06:48:00 GMT


ASF GitHub Bot commented on CB-13496:

dpogue opened a new pull request #45: CB-13496: Fix greedy regex in plist-helpers
   Please make sure the checklist boxes are all checked before submitting the PR. The checklist
   is intended as a quick reference, for complete details please see our Contributor Guidelines:
   ### Platforms affected
   ### What does this PR do?
   Resolves an issue where a regex was overly greedy when comparing plist entries for merging
and could result in collapsing several of them into a single entry.
   ### What testing has been done on this change?
   Added a test that fails with current master and passes with this change, based on the details
provided by @knight9999 in the JIRA bug. It sounds like this might be the cause of GH-44 as
well (/fyi @donnie-jp).
   Now, my fix assumes that we're always looking for `$(something)` and not just `$something`,
which *might* not be a safe assumption. Unfortunately I'm not well-versed enough in iOS stuff
to know :(
   ### Checklist
   - [x] Reported an issue in the JIRA database
   - [x] Commit message follows the format
   - [x] Added automated test coverage as appropriate for this change.

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:

> the plugin config-file tag for iOS plist array behaves unnaturally.
> -------------------------------------------------------------------
>                 Key: CB-13496
>                 URL:
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: cordova-common
>    Affects Versions: 2.1.0
>         Environment: Mac OSX
>            Reporter: Ken Naito
>            Priority: Trivial
>   Original Estimate: 504h
>  Remaining Estimate: 504h
> In the src/util/plist-helpers.js, in the nodeEqual function,
> ```
> node2 = escapeRE(node2).replace(/\\\$\S+/gm, '(.*?)');
> ```
> seems the strange behavior.
> For example, the escaped node2 "$(ABC)Hello" becomes "(.*?)".
> In the previous version of this code is
> ```
> node2 = escapeRE(node2).replace(new RegExp('\\$[a-zA-Z0-9-_]+','gm'),'(.*?)');
> ```
> in this case, the escaped node2 "$(ABC)Hello" is unchaned.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message