diff --git a/README.md b/README.md
index 56f75d6..f5fb37b 100644
--- a/README.md
+++ b/README.md
@@ -1,9 +1,6 @@
-
The edown application
-
-The edown application
-=====================
+#The edown application#
Status:
------
diff --git a/doc/README.md b/doc/README.md
index 9b6eb9a..9fbbe13 100644
--- a/doc/README.md
+++ b/doc/README.md
@@ -1,9 +1,6 @@
-The edown application
-
-The edown application
-=====================
+#The edown application#
Status:
------
diff --git a/doc/edown_doclet.md b/doc/edown_doclet.md
index 234d6fc..1ab0687 100644
--- a/doc/edown_doclet.md
+++ b/doc/edown_doclet.md
@@ -1,9 +1,6 @@
-Module edown_doclet
-===================
-Module edown_doclet
-
+#Module edown_doclet#
* [Description](#description)
* [Function Index](#index)
* [Function Details](#functions)
diff --git a/doc/edown_layout.md b/doc/edown_layout.md
index 8c6d4c1..607fe6b 100644
--- a/doc/edown_layout.md
+++ b/doc/edown_layout.md
@@ -1,9 +1,6 @@
-Module edown_layout
-===================
-Module edown_layout
-
+#Module edown_layout#
* [Description](#description)
* [Function Index](#index)
* [Function Details](#functions)
diff --git a/doc/edown_lib.md b/doc/edown_lib.md
index c843deb..5a782b6 100644
--- a/doc/edown_lib.md
+++ b/doc/edown_lib.md
@@ -1,9 +1,6 @@
-Module edown_lib
-================
-Module edown_lib
-
+#Module edown_lib#
* [Description](#description)
* [Function Index](#index)
* [Function Details](#functions)
diff --git a/doc/edown_xmerl.md b/doc/edown_xmerl.md
index 4c3a752..1de3240 100644
--- a/doc/edown_xmerl.md
+++ b/doc/edown_xmerl.md
@@ -1,9 +1,6 @@
-Module edown_xmerl
-==================
-Module edown_xmerl
-
+#Module edown_xmerl#
* [Function Index](#index)
* [Function Details](#functions)
diff --git a/doc/erlang.png b/doc/erlang.png
deleted file mode 100644
index 987a618..0000000
Binary files a/doc/erlang.png and /dev/null differ
diff --git a/doc/stylesheet.css b/doc/stylesheet.css
deleted file mode 100644
index e426a90..0000000
--- a/doc/stylesheet.css
+++ /dev/null
@@ -1,55 +0,0 @@
-/* standard EDoc style sheet */
-body {
- font-family: Verdana, Arial, Helvetica, sans-serif;
- margin-left: .25in;
- margin-right: .2in;
- margin-top: 0.2in;
- margin-bottom: 0.2in;
- color: #000000;
- background-color: #ffffff;
-}
-h1,h2 {
- margin-left: -0.2in;
-}
-div.navbar {
- background-color: #add8e6;
- padding: 0.2em;
-}
-h2.indextitle {
- padding: 0.4em;
- background-color: #add8e6;
-}
-h3.function,h3.typedecl {
- background-color: #add8e6;
- padding-left: 1em;
-}
-div.spec {
- margin-left: 2em;
- background-color: #eeeeee;
-}
-a.module,a.package {
- text-decoration:none
-}
-a.module:hover,a.package:hover {
- background-color: #eeeeee;
-}
-ul.definitions {
- list-style-type: none;
-}
-ul.index {
- list-style-type: none;
- background-color: #eeeeee;
-}
-
-/*
- * Minor style tweaks
- */
-ul {
- list-style-type: square;
-}
-table {
- border-collapse: collapse;
-}
-td {
- padding: 3
-}
diff --git a/make_doc b/make_doc
index 4c353be..c485932 100755
--- a/make_doc
+++ b/make_doc
@@ -12,6 +12,8 @@ main([]) ->
[{doclet, edown_doclet},
{src_path, ["src"]},
{app_default,"http://www.erlang.org/doc/man"},
+ {stylesheet, ""}, % don't copy stylesheet.css
+ {image, ""}, % don't copy erlang.png
{top_level_readme,
{"./README.md",
"http://github.com/esl/edown"}}]),
diff --git a/rebar.config b/rebar.config
index 52de5f2..70f2eee 100644
--- a/rebar.config
+++ b/rebar.config
@@ -11,4 +11,6 @@
%% doesn't actually use rebar to make its own docs.
%% {edoc_opts, [{doclet, edown_doclet},
%% {src_path, ["src", "test"]},
+%% {stylesheet, ""},
+%% {image, ""},
%% {app_default,"http://www.erlang.org/doc/man"}]}.
diff --git a/src/edown.app.src b/src/edown.app.src
index b532f5f..2dc5f4b 100644
--- a/src/edown.app.src
+++ b/src/edown.app.src
@@ -17,7 +17,7 @@
{application, edown,
[
- {vsn, "0.2.4"},
+ {vsn, git},
{description, "Markdown extension for EDoc"},
{applications, [kernel, stdlib, edoc]},
{env, []}
diff --git a/src/edown_doclet.erl b/src/edown_doclet.erl
index ff6dd2b..0477671 100644
--- a/src/edown_doclet.erl
+++ b/src/edown_doclet.erl
@@ -130,7 +130,7 @@ gen(Sources, App, Packages, Modules, FileMap, Ctxt) ->
{Modules1, Error} = sources(Sources, Dir, Modules, Env, Options),
packages(Packages, Dir, FileMap, Env, Options),
Overview = overview(Dir, Title, Env, Options),
- Data =
+ Data =
[{h1, [Title]}]
++ Overview
++ lists:concat([packages_frame(Packages) || Packages =/= []])
@@ -140,7 +140,7 @@ gen(Sources, App, Packages, Modules, FileMap, Ctxt) ->
edoc_lib:write_file(Text, Dir, ?INDEX_FILE),
edoc_lib:write_info_file(App, Packages, Modules1, Dir),
copy_stylesheet(Dir, Options),
- copy_image(Dir),
+ copy_image(Dir, Options),
make_top_level_README(Data, Options),
%% handle postponed error during processing of source files
case Error of
@@ -397,14 +397,19 @@ overview(Dir, Title, Env, Opts) ->
%% edoc_lib:write_file(Text, Dir, ?OVERVIEW_SUMMARY).
-copy_image(Dir) ->
- case code:priv_dir(?EDOC_APP) of
- PrivDir when is_list(PrivDir) ->
- From = filename:join(PrivDir, ?IMAGE),
- edoc_lib:copy_file(From, filename:join(Dir, ?IMAGE));
- _ ->
- report("cannot find default image file.", []),
- exit(error)
+copy_image(Dir, Options) ->
+ case proplists:get_value(image, Options) of
+ O when O==undefined; O==?IMAGE ->
+ case code:priv_dir(?EDOC_APP) of
+ PrivDir when is_list(PrivDir) ->
+ From = filename:join(PrivDir, ?IMAGE),
+ edoc_lib:copy_file(From, filename:join(Dir, ?IMAGE));
+ _ ->
+ report("cannot find default image file.", []),
+ exit(error)
+ end;
+ "" ->
+ ok
end.
%% NEW-OPTIONS: stylesheet_file
@@ -412,7 +417,7 @@ copy_image(Dir) ->
copy_stylesheet(Dir, Options) ->
case proplists:get_value(stylesheet, Options) of
- undefined ->
+ O when O==undefined; O==?STYLESHEET ->
From = case proplists:get_value(stylesheet_file, Options) of
File when is_list(File) ->
File;
@@ -427,7 +432,7 @@ copy_stylesheet(Dir, Options) ->
end
end,
edoc_lib:copy_file(From, filename:join(Dir, ?STYLESHEET));
- _ ->
+ "" ->
ok
end.
diff --git a/src/edown_layout.erl b/src/edown_layout.erl
index 8b1ace7..4ecb0d7 100644
--- a/src/edown_layout.erl
+++ b/src/edown_layout.erl
@@ -1003,9 +1003,10 @@ local_label(R) ->
"#" ++ R.
-markdown(Title, _CSS, Body) ->
- [{title, [lists:flatten(Title)]}|
- Body].
+markdown(_Title, _CSS, Body) ->
+ %% [{title, [lists:flatten(Title)]}|
+ %% Body].
+ Body.
%% xhtml(Title, CSS, Body) ->
%% [{html, [?NL,
diff --git a/src/edown_xmerl.erl b/src/edown_xmerl.erl
index 2b7054e..b8b717e 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',h1,h2,h3,h4,dd,dt,local_defs,localdef]).
+ lists:member(T, [table,'div',h2,h3,h4,dd,dt,local_defs,localdef]).
no_nl(S) ->
string:strip([C || C <- to_string(S),