forked from uwiger/edown
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
escape brackets in generated pre parts
- Loading branch information
Ulf Wiger
committed
Oct 5, 2011
1 parent
b5f1675
commit 813c322
Showing
5 changed files
with
20 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,7 +31,7 @@ __Authors:__ Ulf Wiger ([`[email protected]`](mailto:ulf.wiger@erla | |
|
||
|
||
|
||
<pre>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</pre> | ||
<pre>run(Command::[doclet_gen()](#type-doclet_gen) | [doclet_toc()](#type-doclet_toc), Ctxt::[edoc_context()](#type-edoc_context)) -> ok</pre> | ||
<br></br> | ||
|
||
|
||
|
@@ -43,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: | ||
|
@@ -77,7 +77,7 @@ functions will also be included. The default value is <code>false</code>. | |
|
||
|
||
|
||
<dt><code>{overview, <a href="http://www.erlang.org/doc/man/edoc.html#type-filename">//edoc/edoc:filename()</a>}</code> | ||
<dt><code>{overview, <a href="/Users/uwiger/ETC/git/edoc/doc/edoc.md#type-filename">//edoc/edoc:filename()</a>}</code> | ||
</dt> | ||
|
||
|
||
|
@@ -117,7 +117,7 @@ specified, no stylesheet reference will be generated. | |
|
||
|
||
|
||
<dt><code>{stylesheet_file, <a href="http://www.erlang.org/doc/man/edoc.html#type-filename">//edoc/edoc:filename()</a>}</code> | ||
<dt><code>{stylesheet_file, <a href="/Users/uwiger/ETC/git/edoc/doc/edoc.md#type-filename">//edoc/edoc:filename()</a>}</code> | ||
</dt> | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ | |
%% limitations under the License. | ||
%%============================================================================== | ||
%% @author Ulf Wiger <[email protected]> | ||
%% @copyright 2010 Erlang Solutions Ltd | ||
%% @copyright 2010 Erlang Solutions Ltd | ||
%% @end | ||
%% ===================================================================== | ||
|
||
|
@@ -572,15 +572,15 @@ format_spec(Name, Type, Defs, #opts{pretty_printer = erl_pp}=Opts) -> | |
L = t_clause(Name, Type), | ||
O = pp_clause(Name, Type), | ||
{R, ".\n"} = etypef(L, O), | ||
[{pre, R}] | ||
[{pre_pre, R}] | ||
catch _:_ -> | ||
%% Example: "@spec ... -> record(a)" | ||
format_spec(Name, Type, Defs, Opts#opts{pretty_printer=''}) | ||
end; | ||
format_spec(Sep, Type, Defs, _Opts) -> | ||
%% Very limited formatting. | ||
Br = if Defs =:= [] -> br; true -> [] end, | ||
[{pre, t_clause(Sep, Type)}, Br]. | ||
[{pre_pre, t_clause(Sep, Type)}, Br]. | ||
|
||
t_clause(Name, Type) -> | ||
#xmlElement{content = [#xmlElement{name = 'fun', content = C}]} = Type, | ||
|
@@ -599,13 +599,13 @@ format_type(Prefix, Name, Type, Last, #opts{pretty_printer = erl_pp}=Opts) -> | |
L = t_utype(Type), | ||
O = pp_type(Name, Type), | ||
{R, ".\n"} = etypef(L, O), | ||
[{pre, Prefix ++ [" = "] ++ R ++ Last}] | ||
[{pre_pre, Prefix ++ [" = "] ++ R ++ Last}] | ||
catch _:_ -> | ||
%% Example: "t() = record(a)." | ||
format_type(Prefix, Name, Type, Last, Opts#opts{pretty_printer =''}) | ||
end; | ||
format_type(Prefix, _Name, Type, Last, _Opts) -> | ||
[{pre, Prefix ++ [" = "] ++ t_utype(Type) ++ Last}]. | ||
[{pre_pre, Prefix ++ [" = "] ++ t_utype(Type) ++ Last}]. | ||
|
||
pp_type(Prefix, Type) -> | ||
Atom = list_to_atom(lists:duplicate(iolist_size(Prefix), $a)), | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters