1 | static S dynamizeGlobalIDsInHTML(S html) {
|
2 | L<S> tok = htmlTok(html); |
3 | Pattern pat = Pattern.compile("([^a-z])([a-z]{16})(?![a-z\\(])");
|
4 | for (int i = 0; i < l(tok); i += 2) { // skip tags
|
5 | S t = " " + tok.get(i) + " "; |
6 | Matcher m = pat.matcher(t); |
7 | new StringBuffer buf; |
8 | while (m.find()) {
|
9 | S id = m.group(2); |
10 | S name = conceptToNameOpt(id); |
11 | mreplace(m, buf, |
12 | m.group(1) + ahref(intelligenceMachineLink(id), id, "title", name)); |
13 | } |
14 | m.appendTail(buf); |
15 | tok.set(i, dropFirstAndLast(str(buf))); |
16 | } |
17 | ret join(tok); |
18 | } |
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: | #1007541 |
| Snippet name: | dynamizeGlobalIDsInHTML |
| Eternal ID of this version: | #1007541/5 |
| Text MD5: | 535f9d93dd406d8ffa94d67c783d6b77 |
| Author: | stefan |
| Category: | javax / a.i. / html |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2019-03-04 19:12:20 |
| Source code size: | 582 bytes / 18 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 760 / 770 |
| Version history: | 4 change(s) |
| Referenced in: | [show references] |