static S html_linkURLs(S html, S params) { L<S> tok = htmlTok(html); for (int i = 0; i < l(tok); i += 2) tok.set(i, tok.get(i).replaceAll("(https?://[^\" ]+)", "<a href=\"$1\"" + params + ">$1</a>")); ret join(tok); } static S html_linkURLs(S html) { ret html_linkURLs(html, ""); }
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1011151 |
Snippet name: | html_linkURLs - takes HTML, outputs HTML |
Eternal ID of this version: | #1011151/13 |
Text MD5: | 795b9a4622bd5f66258d858050a2cb60 |
Author: | stefan |
Category: | javax / html |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-10-20 01:55:47 |
Source code size: | 303 bytes / 10 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 483 / 517 |
Version history: | 12 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) #1011155 - html_linkURLs_targetBlank |