comparison core/src/luan/modules/Html.luan @ 324:b24a35612947

minor parsing improvement git-svn-id: https://luan-java.googlecode.com/svn/trunk@325 21e917c8-12df-6dd8-5cb6-c86387c605b9
author fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
date Mon, 09 Feb 2015 23:15:42 +0000
parents 7f7708e8fdd4
children 78a6a71afbfd
comparison
equal deleted inserted replaced
323:cd2924a1052c 324:b24a35612947
28 end 28 end
29 end 29 end
30 30
31 function add_nofollow(html) 31 function add_nofollow(html)
32 for i, v in ipairs(html) do 32 for i, v in ipairs(html) do
33 if type(v) == "table" and v.type == "tag" then 33 if type(v) == "table" and v.type == "tag" and v.name == "a" then
34 if v.name == "a" then 34 v.attributes.rel = "nofollow"
35 v.attributes.rel = "nofollow"
36 end
37 end 35 end
38 end 36 end
39 end 37 end