message.replace(issueRegex(), issue => { const issuePart = issue.replace('#', '/issues/'); if (issue.startsWith('#')) { return terminalLink(issue, `${url}${issuePart}`); } return terminalLink(issue, `https://github.com/${issuePart}`); })
function powerBy() { console.log('\nPowered by', terminalLink('aliyun-oss-deploy', 'https://github.com/hustcc/aliyun-oss-deploy')) }
Ansi.box(` ${Ansi.joinLines([Ansi.box(votes, 'votes'.red, true, true), Ansi.box(thinBody, 'text'.red, false, true)])} ${Ansi.joinLines([Ansi.box(tags.map(t => t.bold).join(', '), 'tags'.green, false, true), Ansi.box(user.underline, 'user'.green, false, true), Ansi.box(terminalLink(id.toString().underline, url), 'qID'.green, true, true)])} `, `${entities.decode(site).bold} - ${entities.decode(thinTitle).blue}`, false, true)
async function retrieveNewsSiteChoices() { return [ { title: 'El Nuevo Día', value: 'www.elnuevodia.com' }, { title: `\u001B[9mPrimera Hora\u001B[29m (${terminalLink( 'Ver discusión en Github', 'https://github.com/rnegron/noticias-pr-cli/issues/105' )})`, value: 'www.primerahora.com', disabled: true, }, { title: 'El Vocero', value: 'www.elvocero.com' }, { title: 'Noticel', value: 'www.noticel.com' }, { title: 'Salir', value: 'exit' }, ]; }
matchReplace(/<a href="([^"]+)"><span class="ob-post-tag" style="[^"]+">([^<]+)<\/span><\/a>/g, text, (link, title) => `[${terminalLink(title, link.replace(/^\/\//, 'https://')).white}]`, true)
/* istanbul ignore next */ function printArticle(articleImage, article) { console.log(` \n ${articleImage} \n \t\t\tTítulo: ${article.title} \t\t\tPublicado: ${formatDate(article.date_published)} \t\t\tLeer en la web: ${terminalLink(article.domain, article.url, { fallback: terminalLinkFallback, })} \n\n ${htmlToPlainText(article.content)} \n `); }
tweet.replace(/#(\w*[0-9a-zA-Z]+\w*[0-9a-zA-Z])/, (...args) => { const content = args[1] return terminalLink(`#${content}`, `https://twitter.com/hashtag/${content}`) })
(scopes ? '&scope=' + encodeURIComponent(scopes) : '') + '&redirect_uri=' + encodeURIComponent(redirectUri) return terminalLink(`Click here to login on ${provider}`, link)
if(res) const url = terminalLink(res.body.html_url, res.body.html_url); links.push(url); ++count_upload;
matchReplace(/<a href="([^"]+)"(?: rel="nofollow noopener noreferrer")?>([^<>]+)<\/a>/g, text, (link, title) => terminalLink(title, link.replace(/^\/\//, 'https://')), true)