1 | static S html_linkURLs(S html, S params) { |
2 | L<S> tok = htmlTok(html); |
3 | for (int i = 0; i < l(tok); i += 2) |
4 | tok.set(i, tok.get(i).replaceAll("(https?://[^\" ]+)", "<a href=\"$1\"" + params + ">$1</a>")); |
5 | ret join(tok); |
6 | } |
7 | |
8 | static S html_linkURLs(S html) { |
9 | ret html_linkURLs(html, ""); |
10 | } |
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: | 484 / 519 |
Version history: | 12 change(s) |
Referenced in: | [show references] |