Skip to content

Instantly share code, notes, and snippets.

@olanipekunife
Created October 5, 2020 12:45
Show Gist options
  • Save olanipekunife/73dca4d0b382277662d1d0d97904d7b7 to your computer and use it in GitHub Desktop.
Save olanipekunife/73dca4d0b382277662d1d0d97904d7b7 to your computer and use it in GitHub Desktop.
africa's talking implementation
if(!!data.text){
const chkTxt= data.text.split('**')
if(chkTxt.length > 1){
//skip the last
for(let i = 0;i<=chkTxt.length -2;i++){
const holdNew = [...chkTxt[i].split('*')]
holdNew.pop()
chkTxt[i] = holdNew.join('*')
}
data.text= chkTxt.join('')
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment