Commit 452bc79bfca4e95a210fad38bef7dc91937553ca
1 parent
39b3fd4c
fix some typo,
remove alt attribute on html generation if the alt text is empty
Showing
1 changed file
with
19 additions
and
18 deletions
Show diff stats
web/CXM_making_a_web_site.anubis
| ... | ... | @@ -974,27 +974,27 @@ public define Actioner_Aspect |
| 974 | 974 | link(options, text, failure). |
| 975 | 975 | |
| 976 | 976 | public define Actioner_Aspect |
| 977 | - link | |
| 978 | - ( | |
| 979 | - String text | |
| 980 | - ) = | |
| 981 | - link([], text, failure). | |
| 977 | + link | |
| 978 | + ( | |
| 979 | + String text | |
| 980 | + ) = | |
| 981 | + link([], text, failure). | |
| 982 | 982 | |
| 983 | 983 | |
| 984 | 984 | public define Actioner_Aspect |
| 985 | - link | |
| 986 | - ( | |
| 987 | - List(Text_Option) options, | |
| 988 | - Int i | |
| 989 | - ) = | |
| 990 | - link(options,to_decimal(i), failure). | |
| 985 | + link | |
| 986 | + ( | |
| 987 | + List(Text_Option) options, | |
| 988 | + Int i | |
| 989 | + ) = | |
| 990 | + link(options, to_decimal(i), failure). | |
| 991 | 991 | |
| 992 | 992 | public define Actioner_Aspect |
| 993 | - link | |
| 994 | - ( | |
| 995 | - Int i | |
| 996 | - ) = | |
| 997 | - link([], i). | |
| 993 | + link | |
| 994 | + ( | |
| 995 | + Int i | |
| 996 | + ) = | |
| 997 | + link([], i). | |
| 998 | 998 | |
| 999 | 999 | public define Actioner_Aspect |
| 1000 | 1000 | button |
| ... | ... | @@ -4186,8 +4186,9 @@ define Printable_tree |
| 4186 | 4186 | //["<pre>",s,"</pre>"], |
| 4187 | 4187 | any_paragraph(opts,e) then |
| 4188 | 4188 | ["<p", format_text_options(opts), ">",format_element(e),"</p>\n"], |
| 4189 | - any_image(opts, url, alt) then | |
| 4190 | - ["<img alt=\"",alt,"\" src=\"",url,"\" ", format_attrs(opts)," />"], | |
| 4189 | + any_image(opts, url, _alt) then | |
| 4190 | + with alt = if _alt = "" then "" else "alt=\""+_alt+"\"", | |
| 4191 | + ["<img ",alt," src=\"",url,"\" ", format_attrs(opts)," />"], | |
| 4191 | 4192 | any_image(opts, url, alt, w, h) then |
| 4192 | 4193 | ["<img alt=\"",alt,"\" src=\"",url,"\" width=\"",w,"\" height=\"",h,"\" ", format_attrs(opts)," />"], |
| 4193 | 4194 | any_table(opts,h_row, rows, f_row) then | ... | ... |