static S htag(S tag) { ret htag(tag, ""); } static S mapMethodLike htag(S tag, O contents, O... params) { S openingTag = hopeningTag(tag, params); S s = str(contents); if (empty(s) && neqic(tag, "script")) ret dropLast(openingTag) + "/>"; ret openingTag + s + "</" + tag + ">"; }
download show line numbers debug dex old transpilations
Travelled to 18 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ekrmjmnbrukm, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mowyntqkapby, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, qsqiayxyrbia, tslmcundralx, tvejysmllsmz, vouqrxazstgt, whxojlpjdney, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1002214 |
Snippet name: | htag - make HTML tag. uses trailing slash (e.g. <img ... />) when contents is empty |
Eternal ID of this version: | #1002214/8 |
Text MD5: | f2a365ed8336adcd7dd85264f8579d49 |
Author: | stefan |
Category: | javax html |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-04-09 13:19:07 |
Source code size: | 304 bytes / 11 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 864 / 2300 |
Version history: | 7 change(s) |
Referenced in: | [show references] |