Skip to content
This repository has been archived by the owner on Sep 26, 2023. It is now read-only.

Replacing numbers only causes "undefined" #31

Closed
wlaurance opened this issue Jan 20, 2014 · 2 comments
Closed

Replacing numbers only causes "undefined" #31

wlaurance opened this issue Jan 20, 2014 · 2 comments

Comments

@wlaurance
Copy link

I am using replace@0.2.7 to replace part of a phone number.

I have tried a few variations

replace 383 343 -rp .
replace "383" "343" -rp .

It results in

<p>By Phone: <a href="tel:+1888undefined8400">888.undefined.8400</a>

If I add a non digit character to the replacement text, it seems to pick it up correctly.

replace 383 343a -rp .
<p>By Phone: <a href="tel:+1888343a8400">888.343a.8400</a>

Perhaps the numbers aren't parsing correctly? I will take a look when I have some time but wanted to report the issue promptly.

@harthur
Copy link
Owner

harthur commented Jan 21, 2014

Thanks for reporting, that's not good.

Looks like it's just in the preview, and it's actually correctly replaced in the file.

@harthur
Copy link
Owner

harthur commented Jan 21, 2014

Fixed w/ 90a1821. Issue was with use of terminal coloring module. Thanks again.

@harthur harthur closed this as completed Jan 21, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants