Giter VIP home page Giter VIP logo

react-text-format's People

Contributors

ahsan-bilal-786 avatar ahsanbilalas avatar mattjennings avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

react-text-format's Issues

Request: support spaces in phone numbers

This is just a feature request to support spaces in phone numbers such as (206) 782-8410

Currently this is not picked up as a phone number because of the space

Create hierarchy on decorator?

I was trying to create a highlight for a search text but it din't work if I am searching by the words in the url. Can a hierarchy over the decorators be created, to overwrite if it is both URL and term for instance?

String containing `%` will crash the component

If the string passed to component children contains %, it will crash the component hence crashing the whole renderer.
This happens because decodeURIComponent used on src/parsers/scrapper.js line 20 will throw an error URIError if the string contains % not followed by two hex digits or it does not produce valid UTF-8 character (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent).
So if the string contains something like It's 5% of the whole, it will crash.

Matching URL's that contain spaces %20

Hi, Thanks for this awesome add on.

I ran into an issue where If the link contains white space "%20", (I know right people should never be using white space in their URL's)

Then the link gets trimmed short and thus incorrect

for example using the encoded link: http://go%2Emsn%2Ecom/nl/133942%20Easp

it renders as
<a href="http://go.msn.com/nl/133942" target="_blank" rel="noopener" >http://go.msn.com/nl/133942</a> Easp

Is there a temporary workaround for this to include %20 in the regex to match the whitespace?

Possible to Extend?

Thanks for a great lib!

Is there any way to extend this? For example to discern youtube, or vimeo links for embedding?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.