diff --git a/README.md b/README.md
index f5fb37b..4f326f2 100644
--- a/README.md
+++ b/README.md
@@ -112,8 +112,7 @@ See [bin/MARKEDOC-README.md](http://github.com/esl/edown/blob/master/bin/MARKEDO
-
Modules
-
+##Modules##
diff --git a/doc/README.md b/doc/README.md
index 9fbbe13..ce4327e 100644
--- a/doc/README.md
+++ b/doc/README.md
@@ -112,8 +112,7 @@ See [bin/MARKEDOC-README.md](bin/MARKEDOC-README.md).
-Modules
-
+##Modules##
diff --git a/doc/edown_doclet.md b/doc/edown_doclet.md
index 1ab0687..8d4e208 100644
--- a/doc/edown_doclet.md
+++ b/doc/edown_doclet.md
@@ -12,31 +12,28 @@ EDoc Doclet module for producing Markdown.
Copyright (c) 2010 Erlang Solutions Ltd
-__Authors:__ Ulf Wiger ([`ulf.wiger@erlang-solutions.com`](mailto:ulf.wiger@erlang-solutions.com)).
-
-
+__Authors:__ Ulf Wiger ([`ulf.wiger@erlang-solutions.com`](mailto:ulf.wiger@erlang-solutions.com)).
+##Function Index##
run/2 | Main doclet entry point. |
+
-
-
-
+##Function Details##
-run/2
-
-
+###run/2##
-run(Command::doclet_gen() | doclet_toc(), Ctxt::edoc_context()) -> ok
-
+run(Command :: doclet_gen() | doclet_toc(),
+ Ctxt :: edoc_context()) ->
+ ok
@@ -46,8 +43,8 @@ Main doclet entry point.
-Also see [`//edoc/edoc:layout/2`](http://www.erlang.org/doc/man/edoc.html#layout-2) for layout-related options, and
-[`//edoc/edoc:get_doc/2`](http://www.erlang.org/doc/man/edoc.html#get_doc-2) for options related to reading source
+Also see [`//edoc/edoc:layout/2`](/Users/uwiger/ETC/git/edoc/doc/edoc.md#layout-2) for layout-related options, and
+[`//edoc/edoc:get_doc/2`](/Users/uwiger/ETC/git/edoc/doc/edoc.md#get_doc-2) for options related to reading source
files.
Options:
@@ -80,7 +77,7 @@ functions will also be included. The default value is false
.
-{overview, //edoc/edoc:filename()}
+{overview, //edoc/edoc:filename()}
@@ -120,7 +117,7 @@ specified, no stylesheet reference will be generated.
-{stylesheet_file, //edoc/edoc:filename()}
+{stylesheet_file, //edoc/edoc:filename()}
diff --git a/doc/edown_layout.md b/doc/edown_layout.md
index 607fe6b..ef94c7b 100644
--- a/doc/edown_layout.md
+++ b/doc/edown_layout.md
@@ -12,29 +12,25 @@ Markdown layout module for EDoc.
Copyright (c) 2010 Erlang Solutions Ltd
-__Authors:__ Ulf Wiger ([`ulf.wiger@erlang-solutions.com`](mailto:ulf.wiger@erlang-solutions.com)).
-
-
+__Authors:__ Ulf Wiger ([`ulf.wiger@erlang-solutions.com`](mailto:ulf.wiger@erlang-solutions.com)).
+##Description##
Derived from `edoc_layout`, which is part of the Erlang/OTP application EDoc.
-The module is intended to be used together with edoc.
-
-
+The module is intended to be used together with edoc.
+##Function Index##
+
-
-
-
+##Function Details##
-markdown/3
-
+###markdown/3##
@@ -43,8 +39,7 @@ The module is intended to be used together with edoc.
-module/2
-
+###module/2##
@@ -123,18 +118,17 @@ the source file. The default value is true
.
-Specifies an xmerl
callback module to be
-used for exporting the documentation. See //xmerl/xmerl:export_simple_content/2
for details.
+Specifies an xmerl
callback module to be
+used for exporting the documentation. See //xmerl/xmerl:export_simple_content/2
for details.
-__See also:__ [//edoc/edoc:layout/2](http://www.erlang.org/doc/man/edoc.html#layout-2), [edown_doclet:layout/2](edown_doclet.md#layout-2).
-
-overview/2
+__See also:__ [//edoc/edoc:layout/2](/Users/uwiger/ETC/git/edoc/doc/edoc.md#layout-2), [edown_doclet:layout/2](edown_doclet.md#layout-2).
+###overview/2##
@@ -143,8 +137,7 @@ __See also:__ [//edoc/edoc:layout/2](http://www.erlang.org/doc/man/edoc.html#lay
-package/2
-
+###package/2##
@@ -153,8 +146,7 @@ __See also:__ [//edoc/edoc:layout/2](http://www.erlang.org/doc/man/edoc.html#lay
-type/1
-
+###type/1##
diff --git a/doc/edown_lib.md b/doc/edown_lib.md
index 5a782b6..5dd0893 100644
--- a/doc/edown_lib.md
+++ b/doc/edown_lib.md
@@ -12,24 +12,21 @@ Markdown for EDoc - common support functions.
Copyright (c) 2010 Erlang Solutions Ltd
-__Authors:__ Ulf Wiger ([`ulf.wiger@erlang-solutions.com`](mailto:ulf.wiger@erlang-solutions.com)).
-
-
+__Authors:__ Ulf Wiger ([`ulf.wiger@erlang-solutions.com`](mailto:ulf.wiger@erlang-solutions.com)).
+##Function Index##
+
-
-
-
+##Function Details##
-export/1
-
+###export/1##
@@ -38,8 +35,7 @@ __Authors:__ Ulf Wiger ([`ulf.wiger@erlang-solutions.com`](mailto:ulf.wiger@erla
-get_attrval/2
-
+###get_attrval/2##
@@ -48,8 +44,7 @@ __Authors:__ Ulf Wiger ([`ulf.wiger@erlang-solutions.com`](mailto:ulf.wiger@erla
-redirect_uri/1
-
+###redirect_uri/1##
diff --git a/doc/edown_xmerl.md b/doc/edown_xmerl.md
index 1de3240..499950d 100644
--- a/doc/edown_xmerl.md
+++ b/doc/edown_xmerl.md
@@ -11,24 +11,21 @@
Copyright (c) 2010 Erlang Solutions Ltd
-__Authors:__ Ulf Wiger ([`ulf.wiger@erlang-solutions.com`](mailto:ulf.wiger@erlang-solutions.com)).
-
-
+__Authors:__ Ulf Wiger ([`ulf.wiger@erlang-solutions.com`](mailto:ulf.wiger@erlang-solutions.com)).
+##Function Index##
+
-
-
-
+##Function Details##
-'#element#'/5
-
+###'#element#'/5##
@@ -37,8 +34,7 @@ __Authors:__ Ulf Wiger ([`ulf.wiger@erlang-solutions.com`](mailto:ulf.wiger@erla
-'#root#'/4
-
+###'#root#'/4##
@@ -47,8 +43,7 @@ __Authors:__ Ulf Wiger ([`ulf.wiger@erlang-solutions.com`](mailto:ulf.wiger@erla
-'#text#'/1
-
+###'#text#'/1##
@@ -57,8 +52,7 @@ __Authors:__ Ulf Wiger ([`ulf.wiger@erlang-solutions.com`](mailto:ulf.wiger@erla
-'#xml-inheritance#'/0
-
+###'#xml-inheritance#'/0##
diff --git a/src/edown_layout.erl b/src/edown_layout.erl
index 4ecb0d7..b22d109 100644
--- a/src/edown_layout.erl
+++ b/src/edown_layout.erl
@@ -198,8 +198,9 @@ layout_module(#xmlElement{name = module, content = Es}=E, Opts) ->
++ sees(Es)
++ todos(Es)
++ if RestDesc == [] -> [];
- true -> [{h2, [{a, [{name, "description"}],
- ["Description"]}]}
+ true -> [
+ {a, [{name, "description"}], []},
+ {h2, ["Description"]}
| RestDesc]
end
++ types(lists:sort(Types), Opts)
@@ -341,8 +342,9 @@ function_index(Fs, Cols) ->
case function_index_rows(Fs, Cols, []) of
[] -> [];
Rows ->
- [{h2, [{a, [{name, ?FUNCTION_INDEX_LABEL}],
- [?FUNCTION_INDEX_TITLE]}]},
+ [
+ {a, [{name, ?FUNCTION_INDEX_LABEL}], []},
+ {h2, [?FUNCTION_INDEX_TITLE]},
{table, [{width, "100%"}, {border, 1},
{cellspacing,0}, {cellpadding,2},
{summary, "function index"}],
@@ -401,7 +403,8 @@ functions(Fs, Opts) ->
if Es == [] -> [];
true ->
[?NL,
- {h2, [{a, [{name, ?FUNCTIONS_LABEL}], [?FUNCTIONS_TITLE]}]},
+ {a, [{name, ?FUNCTIONS_LABEL}], []},
+ {h2, [?FUNCTIONS_TITLE]},
?NL | Es]
end.
@@ -519,8 +522,8 @@ types([], _Opts) -> [];
types(Ts, Opts) ->
Es = lists:flatmap(fun ({Name, E}) -> typedecl(Name, E, Opts) end, Ts),
[?NL,
- {h2, [{a, [{name, ?DATA_TYPES_LABEL}],
- [?DATA_TYPES_TITLE]}]},
+ {a, [{name, ?DATA_TYPES_LABEL}], []},
+ {h2, [?DATA_TYPES_TITLE]},
?NL | Es].
typedecl(Name, E=#xmlElement{content = Es}, Opts) ->
diff --git a/src/edown_xmerl.erl b/src/edown_xmerl.erl
index b8b717e..d658217 100644
--- a/src/edown_xmerl.erl
+++ b/src/edown_xmerl.erl
@@ -180,7 +180,7 @@ needs_html(T) ->
needs_html(T, []).
needs_html(T, _Attrs) ->
- lists:member(T, [table,'div',h2,h3,h4,dd,dt,local_defs,localdef]).
+ lists:member(T, [table,'div',dd,dt,local_defs,localdef]).
no_nl(S) ->
string:strip([C || C <- to_string(S),