static bool getHtmlTagParameters_debug; static SS getHtmlTagParameters(S tag) { if (empty(tag)) null; L<S> tok = codeTokens(tok_joinMinusIdentifiers(htmlFineTok(tag))); if (getHtmlTagParameters_debug) printStruct(tok); assertEquals("<", tok.get(0)); int i = 1; if (eq(tok.get(1), "/")) ++i; S name = tok.get(i++); if (!isMinusIdentifier(name)) fail(tag + " (" + name + ")"); new SS map; while (i < l(tok)) { S t = tok.get(i); if (eqOneOf(t, "/", ">")) break; if (!isMinusIdentifier(t)) fail(tag + " (" + t + ")"); ++i; S value = "1"; if (eq(tok.get(i), "=")) { ++i; value = htmlunquote(tok.get(i++)); } map.put(t, value); } ret map; }
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1005220 |
Snippet name: | getHtmlTagParameters - TODO: fix |
Eternal ID of this version: | #1005220/11 |
Text MD5: | cf02a969362cf227aece1ca35d2f278f |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-10-23 00:07:00 |
Source code size: | 745 bytes / 29 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 661 / 637 |
Version history: | 10 change(s) |
Referenced in: | [show references] |