Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

12
LINES

< > BotCompany Repo | #1029719 // ol - make ordered HTML list (no htmlencode)

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (2798L/17K).

sS ol(S... list) {
  ret ol(asList(list));
}

sS ol(LS list, O... params) {
  new StringBuilder buf;
  int i = indexOf(params, null); // null separates params for ul from params for li
  if (i == -1) i = l(params);
  for (S s : withoutNulls(list))
    buf.append(tag("li", s, subArray(params, i+1))).append("\n");
  ret containerTag("ol", buf, subArray(params, 0, i)) + "\n";
}

Author comment

Began life as a copy of #1002439

download  show line numbers  debug dex  old transpilations   

Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1029719
Snippet name: ol - make ordered HTML list (no htmlencode)
Eternal ID of this version: #1029719/1
Text MD5: 61ef420e959a2a560628c438f4cedbdc
Transpilation MD5: a5712edfed1a1621e92054d14df62522
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-09-08 15:28:45
Source code size: 388 bytes / 12 lines
Pitched / IR pitched: No / No
Views / Downloads: 126 / 194
Referenced in: [show references]