Arc Forumnew | comments | leaders | submitlogin
Could not open a link in a new window
2 points by codepapa 4418 days ago | 1 comment
I want to open a link in a new window,try to modify the news.arc like that: (let toself (blank url) (tag (a target "_blank" href (if toself (item-url s!id)

then run on arc , it prompt : < igonring a for target ... but it would not work, anyone can tell me what is wrong?



3 points by akkartik 4418 days ago | link

Ah yes, the legal attributes for different html tags are specified by the attribute macro in news.arc: https://github.com/arclanguage/anarki/blob/f17c3d2016/lib/ht.... Try adding a similar line:

  (attribute a target opstring)
Here's a more comprehensive fix I made in my repo: https://github.com/akkartik/arc/commit/d7f9b05463#diff-1. I'll update anarki later today or tomorrow, but feel free to send me a pull request :)

Update: it turns out this already works in anarki (thanks to Mark Huetsch): https://github.com/arclanguage/anarki/commit/8fb05f1383#html.... Where did you download arc from, codepapa? Please take a look at https://sites.google.com/site/arclanguagewiki for better-supported versions.

-----