Code Monkey home page Code Monkey logo

Comments (5)

IamJeffG avatar IamJeffG commented on August 17, 2024 1

I have no objection to that change. I do often deal with ranges like "¼–½" but I'm equally fine to receive "1/4-1/2" as "1/4 - 1/2".

If anyone is out there who's parsing strings like "½¾" or "¾9", they would view the change as a regression, but seems very unlikely. In those cases I'm not even sure we can intuit what the expected behavior ought to be.

from unidecode.

avian2 avatar avian2 commented on August 17, 2024 1

Thank you both for your comments. I'm removing the trailing space in the replacements for fractions. I'll be releasing a new version of Unidecode with this change shortly.

from unidecode.

avian2 avatar avian2 commented on August 17, 2024

The extra space was introduced in b8af436 to prevent fractions from merging with adjacent numbers.

from unidecode.

RichardForshaw avatar RichardForshaw commented on August 17, 2024

Yes, I think that adding the extra space at the start to prevent the merging is good, but I wonder if the extra trailing space is needed? I can't currently think of any examples where something deliberately adjacent & following a fraction such as ¾ would require a space separation. I expect other trailing numbers would already have a space in the original string. (But preceding numbers may not, in which case I agree introducing a space there is a good thing).

from unidecode.

avian2 avatar avian2 commented on August 17, 2024

@IamJeffG Since you contributed the commit that added the spaces, do you have any objection to removing the trailing space?

from unidecode.

Related Issues (20)

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.