Skip to content

Commit

Permalink
(clean) prettier code
Browse files Browse the repository at this point in the history
  • Loading branch information
antoine92190 committed Oct 2, 2020
1 parent fabb5d5 commit efd7e93
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/utils/formatString.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ function compileToJSON(str) {

let links = linkify.find(str)
let min_index_from_link = false
if(links.length > 0) {

if (links.length > 0) {
min_index_of = str.indexOf(links[0].value)
min_index_from_link = true
}
Expand All @@ -88,7 +88,7 @@ function compileToJSON(str) {
}
})

if(min_index_from_link && min_index_of_key != -1) {
if (min_index_from_link && min_index_of_key !== -1) {
let str_left = str.substr(0, min_index_of)
let str_link = str.substr(min_index_of, links[0].value.length)
let str_right = str.substr(min_index_of + links[0].value.length)
Expand Down

0 comments on commit efd7e93

Please sign in to comment.