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

13
LINES

< > BotCompany Repo | #1023830 // html_linksPlusContents

JavaX fragment (include)

static L<PairS> html_linksPlusContents(LS tok) {
  new LPair<S> out;
  for (LS tokA : findContainerTag(tok, "a")) {
    S link = containerTagParam(tokA, "href");
    if (nempty(link))
      out.add(pair(link, join(contentsOfContainerTag(tokA))));
  }
  ret out;
}

static L<PairS> html_linksPlusContents(S html) {
  ret html_linksPlusContents(htmlTok(html));
}

Author comment

Began life as a copy of #1008481

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: #1023830
Snippet name: html_linksPlusContents
Eternal ID of this version: #1023830/4
Text MD5: eedb086add4117d6d4d61be0d57c1d81
Author: stefan
Category: javax / html parsing
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-07-10 12:44:00
Source code size: 372 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 135 / 172
Version history: 3 change(s)
Referenced in: [show references]