Browse files

use <a name=""> instead of <a name="" />

  • Loading branch information...
1 parent 59d8b04 commit a7f2f9530535e6f5d1b5ed1e374d3867a719701e @etrepum etrepum committed Jul 18, 2010
Showing with 5 additions and 2 deletions.
  1. +5 −2 src/erldocs.erl
View
7 src/erldocs.erl
@@ -150,7 +150,7 @@ emit_index(L) ->
lists:sort(fun sort_index/2, L)).
index_html(["app", App, _, _Sum]) ->
- [{a, [{name, App}], []}, {h1, [], [App]}];
+ [{a, [{name, App}]}, {h1, [], [App]}];
index_html(["mod", App, Mod, Sum]) ->
Url = App ++ "/" ++ Mod ++ ".html",
[{p,[], [{a, [{href, Url}], [Mod]}, {br,[],[]}, Sum]}];
@@ -198,7 +198,7 @@ render(erlref, App, Mod, Xml, Conf, Tpl) ->
|| X <- lists:reverse(Funs) ],
Args = [{base, "../"},
- {title, Mod ++ " - " ++ kf(name, Conf)},
+ {title, Mod ++ " (" ++ App ++ ") - " ++ kf(name, Conf)},
{content, xml_to_str(NXml)},
{funs, xml_to_str({ul, [{id, "funs"}], XmlFuns})}],
@@ -386,6 +386,9 @@ is_whitespace(X) ->
xml_to_str(Xml) ->
xml_to_html(Xml).
+xml_to_html({Tag, Attr}) ->
+ %% primarily for cases such as <a name="">
+ fmt("<~s ~s>", [Tag, atos(Attr)]);
xml_to_html({Tag, Attr, []}) ->
fmt("<~s ~s />", [Tag, atos(Attr)]);
xml_to_html({Tag, [], []}) ->

0 comments on commit a7f2f95

Please sign in to comment.