Permalink
Browse files

fix uri redirect & nl after index

  • Loading branch information...
1 parent 8fc6e87 commit 2b22898ad53a8cc46acef57c36906454bd6043e8 Ulf Wiger committed Oct 31, 2010
Showing with 20 additions and 9 deletions.
  1. +3 −1 doc/edown_doclet.md
  2. +4 −2 doc/edown_layout.md
  3. +3 −1 doc/edown_lib.md
  4. +3 −1 doc/edown_xmerl.md
  5. +1 −0 src/edown_layout.erl
  6. +6 −4 src/edown_lib.erl
View
@@ -7,6 +7,8 @@ Module edown_doclet
* [Description](#description)
* [Function Index](#index)
* [Function Details](#functions)
+
+
EDoc Doclet module for producing Github-flavored Markdown.
@@ -148,4 +150,4 @@ will be copied to the target directory.
-_Generated by EDoc, Oct 31 2010, 18:25:18._
+_Generated by EDoc, Oct 31 2010, 21:13:12._
View
@@ -7,6 +7,8 @@ Module edown_layout
* [Description](#description)
* [Function Index](#index)
* [Function Details](#functions)
+
+
Github-flavored Markdown layout module for EDoc.
@@ -121,7 +123,7 @@ used for exporting the documentation. See <a href="http://www.erlang.org/doc/man
-__See also:__ [//edoc/edoc:layout/2](http://www.erlang.org/doc/man/edoc.html#layout-2), [edown_doclet:layout/2](edown_doclet.html#layout-2).
+__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).
<a name="overview-2"></a>
@@ -159,4 +161,4 @@ __See also:__ [//edoc/edoc:layout/2](http://www.erlang.org/doc/man/edoc.html#lay
-_Generated by EDoc, Oct 31 2010, 18:25:18._
+_Generated by EDoc, Oct 31 2010, 21:13:12._
View
@@ -7,6 +7,8 @@ Module edown_lib
* [Description](#description)
* [Function Index](#index)
* [Function Details](#functions)
+
+
Github-flavored Markdown for EDoc - common support functions.
@@ -65,4 +67,4 @@ __Authors:__ Ulf Wiger ([`ulf.wiger@erlang-solutions.com`](mailto:ulf.wiger@erla
-_Generated by EDoc, Oct 31 2010, 18:25:18._
+_Generated by EDoc, Oct 31 2010, 21:13:12._
View
@@ -10,6 +10,8 @@ Module edown_xmerl
+
+
Copyright © 2010 Erlang Solutions Ltd
__Authors:__ Ulf Wiger ([`ulf.wiger@erlang-solutions.com`](mailto:ulf.wiger@erlang-solutions.com)).
@@ -76,4 +78,4 @@ __Authors:__ Ulf Wiger ([`ulf.wiger@erlang-solutions.com`](mailto:ulf.wiger@erla
-_Generated by EDoc, Oct 31 2010, 18:25:18._
+_Generated by EDoc, Oct 31 2010, 21:13:12._
View
@@ -172,6 +172,7 @@ layout_module(#xmlElement{name = module, content = Es}=E, Opts) ->
Body = ([] % navigation("top")
++ [{h1, Title}]
++ doc_index(FullDesc, Functions, Types)
+ ++ [{p,[]}]
++ ShortDesc
++ [{p,[]}]
++ copyright(Es)
View
@@ -59,13 +59,15 @@ redirect_uri("/" ++ _ = URI, "//" ++ _, E) ->
false ->
false
end;
-redirect_uri(_, Name, E) ->
- case re:split(Name, ":", [{return,list}]) of
- [_, _] ->
+redirect_uri("", _, _) ->
+ false;
+redirect_uri(Href, _Name, E) ->
+ case lists:member("/", Href) of
+ false ->
[_|_] = URI = get_attrval(href, E),
NewURI = re:replace(URI,".html",".md",[{return,list}]),
replace_uri(NewURI, E);
- _ ->
+ true ->
false
end.

0 comments on commit 2b22898

Please sign in to comment.