Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

updated edown_layout with R14B02 additions

  • Loading branch information...
commit 5ca2ed63e01c9725a612d1775df3768f90fe7001 1 parent 555e039
Ulf Wiger authored
View
12 Makefile
@@ -0,0 +1,12 @@
+.PHONY: all compile clean doc
+
+all: compile doc
+
+compile:
+ ./rebar compile
+
+clean:
+ ./rebar clean
+
+doc:
+ ./rebar doc
View
6 NOTICE
@@ -3,4 +3,8 @@ to EDoc.
EDoc was written by Richard Carlsson, (c) 2001-2007 Richard Carlsson.
It is part of Erlang/OTP (http://www.erlang.org) and available
-via the Erlang Public License (EPL).
+via the Erlang Public License (EPL).
+
+Original idea and implementation for EDown: ulf.wiger@erlang-solutions.com
+
+Markedoc contributed by Henning Dietrich <hd2010@eonblast.com>
View
29 doc/README.md
@@ -57,11 +57,40 @@ written, and the outline of each, other plugins convert to suitable
content representation (e.g. HTML or Markdown), and EDoc then
writes the files necessary.
+
+
For now, EDown focuses on producing reasonable Markdown, rather
than complying fully with the plugin framework. That is, the
edown_doclet module will not go out of its way to function together
with any other layout module than edown_layout, and vice versa.
+
+
+markedoc
+========
+
+
+
+The sed script bin/markedoc works in the opposite direction and converts
+your `README.md` to an `EDoc` file.
+
+
+
+See [bin/MARKEDOC-README.md](bin/MARKEDOC-README.md).
+
+
+
+**FreeBSD, Mac OS X**
+`$ sed -E -f markedoc.sed <markdown file> > <edoc file>`
+
+
+
+**Linux**
+`$ sed -r -f markedoc.sed <markdown file> > <edoc file>`
+
+
+
+
<h2 class="indextitle">Modules</h2>
View
4 doc/edown_doclet.md
@@ -39,7 +39,7 @@ __Authors:__ Ulf Wiger ([`ulf.wiger@erlang-solutions.com`](mailto:ulf.wiger@erla
-<tt>run(Command::<a href="#type-doclet_gen">doclet_gen()</a> | <a href="#type-doclet_toc">doclet_toc()</a>, Ctxt::<a href="#type-edoc_context">edoc_context()</a>) -> ok</tt>
+<tt>runfun((Command::<a href="#type-doclet_gen">doclet_gen()</a> | <a href="#type-doclet_toc">doclet_toc()</a>, Ctxt::<a href="#type-edoc_context">edoc_context()</a>) -> ok)</tt>
@@ -150,4 +150,4 @@ will be copied to the target directory.
-_Generated by EDoc, Dec 31 2010, 09:13:36._
+_Generated by EDoc, Mar 23 2011, 18:36:45._
View
2  doc/edown_layout.md
@@ -161,4 +161,4 @@ __See also:__ [//edoc/edoc:layout/2](http://www.erlang.org/doc/man/edoc.html#lay
-_Generated by EDoc, Dec 31 2010, 09:13:36._
+_Generated by EDoc, Mar 23 2011, 18:36:45._
View
2  doc/edown_lib.md
@@ -67,4 +67,4 @@ __Authors:__ Ulf Wiger ([`ulf.wiger@erlang-solutions.com`](mailto:ulf.wiger@erla
-_Generated by EDoc, Dec 31 2010, 09:13:36._
+_Generated by EDoc, Mar 23 2011, 18:36:45._
View
2  doc/edown_xmerl.md
@@ -78,4 +78,4 @@ __Authors:__ Ulf Wiger ([`ulf.wiger@erlang-solutions.com`](mailto:ulf.wiger@erla
-_Generated by EDoc, Dec 31 2010, 09:13:36._
+_Generated by EDoc, Mar 23 2011, 18:36:45._
View
17 doc/overview.edoc
@@ -40,4 +40,21 @@ For now, EDown focuses on producing reasonable Markdown, rather
than complying fully with the plugin framework. That is, the
edown_doclet module will not go out of its way to function together
with any other layout module than edown_layout, and vice versa.
+
+markedoc
+========
+
+The sed script bin/markedoc works in the opposite direction and converts
+your `README.md' to an `EDoc' file.
+
+See <a href="bin/MARKEDOC-README.md">bin/MARKEDOC-README.md</a>.
+
+**FreeBSD, Mac OS X**
+ `$ sed -E -f markedoc.sed <markdown file> > <edoc file>'
+
+**Linux**
+ `$ sed -r -f markedoc.sed <markdown file> > <edoc file>'
+
+
+
@end
View
3  ebin/.gitignore
@@ -1 +1,2 @@
-./*
+*.beam
+*.app
View
22 src/edown_layout.erl
@@ -715,16 +715,24 @@ t_type([E=#xmlElement{name = atom}]) ->
t_atom(E);
t_type([E=#xmlElement{name = integer}]) ->
t_integer(E);
+t_type([E=#xmlElement{name = range}]) ->
+ t_range(E);
+t_type([E=#xmlElement{name = binary}]) ->
+ t_binary(E);
t_type([E=#xmlElement{name = float}]) ->
t_float(E);
t_type([#xmlElement{name = nil}]) ->
t_nil();
t_type([#xmlElement{name = list, content = Es}]) ->
t_list(Es);
+t_type([#xmlElement{name = paren, content = Es}]) ->
+ t_paren(Es);
+t_type([#xmlElement{name = nonempty_list, content = Es}]) ->
+ t_nonempty_list(Es);
t_type([#xmlElement{name = tuple, content = Es}]) ->
t_tuple(Es);
t_type([#xmlElement{name = 'fun', content = Es}]) ->
- t_fun(Es);
+ ["fun("] ++ t_fun(Es) ++ [")"];
t_type([#xmlElement{name = record, content = Es}]) ->
t_record(Es);
t_type([E = #xmlElement{name = abstype, content = Es}]) ->
@@ -742,15 +750,27 @@ t_atom(E) ->
t_integer(E) ->
[get_attrval(value, E)].
+t_range(E) ->
+ [get_attrval(value, E)].
+
+t_binary(E) ->
+ [get_attrval(value, E)].
+
t_float(E) ->
[get_attrval(value, E)].
t_nil() ->
["[]"].
+t_paren(Es) ->
+ ["("] ++ t_utype(get_elem(type, Es)) ++ [")"].
+
t_list(Es) ->
["["] ++ t_utype(get_elem(type, Es)) ++ ["]"].
+t_nonempty_list(Es) ->
+ ["["] ++ t_utype(get_elem(type, Es)) ++ [", ...]"].
+
t_tuple(Es) ->
["{"] ++ seq(fun t_utype_elem/1, Es, ["}"]).
Please sign in to comment.
Something went wrong with that request. Please try again.