Giter VIP home page Giter VIP logo

link-builder's Introduction

OlΓ‘ Mundo, eu sou o Teles πŸ‘‹

Antifascista badge Linkedin Badge

  • πŸ‘¨β€πŸ¦² ${current_year - 1988} anos
  • πŸ‘¨β€πŸ’» Desenvolvedor web profissional desde a Γ©poca em que o IE6 era inovador
  • 🚘 Ex-vendedor de carros usados
  • πŸ‘„ Autoproclamado programador meia-boca (mas aprendendo sempre)
  • πŸ‘¨β€πŸŽ¨ Poeta amador em Versos do mundo
  • 🏘️ Sr. Software Engineer em Latitud
  • 🌎 Acredito que software livre Γ© uma excelente ideia e uma necessidade pra sociedade
  • πŸ†“ Pegue uma ideia de aplicativo grΓ‘tis aqui!

Trabalho com:

  • Javascript, ES6 βœ…
  • HTML βœ…
  • SEO βœ…
  • VueJS βœ…
  • AngularJS βœ…
  • CSS3, SASS βœ…
  • Google Analytics βœ…
  • Vontade de comer pizza πŸ•

Status GitHub:

Teles's github stats

link-builder's People

Contributors

codacy-badger avatar teles avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

link-builder's Issues

[BUG] Multiple copies of original content being created

I'm testing this package with two replacements:

new LinkBuilder(linkBuilderNode.innerHTML, [{anchor: "https://pt.wikipedia.org/wiki/Casa", keyword: "casa", max: 5}, {anchor: "https://pt.wikipedia.org/wiki/Moradia", keyword: "Moradia"}]);

but it is duplicating the content linkBuilderNode.innerHTML.

This sould be fixed.

Matches needs to include only whole words

Matches needs to include only whole words, it means that strings which are only part of a greather word should not be matched.

Example:

  • if male keyword is the pattern the female word should not be matched.

Adds unit tests to LinkBuilder

Add some unit tests to LinkBuilder to make sure it is correctly doing these things:

  • Returning the original sentence when no keyword is match;
  • Applying one simple replacement;
  • Replacing the same anchor twice;
  • Replacing two different anchors;
  • Using insensitive:true to do match keywords in uppercase and lowercase;
  • Getting a max number of sentences by keywords;
  • Getting max number of sentences using insensitive: true;
  • Doesn't get a keyword as part of a full word;
  • [ ]Replacing first keyword which is part of another whole word

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.