25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-26 16:26:24 +01:00

Customize escobar_hilite.erl for ejabberd purposes.

SVN Revision: 2699
This commit is contained in:
Badlop 2009-10-23 15:12:32 +00:00
parent abcb3f22a8
commit 22fffb32ca
2 changed files with 11 additions and 3 deletions

View File

@ -11,3 +11,9 @@
.call {color: purple} .call {color: purple}
.attribute {color: firebrick} .attribute {color: firebrick}
.error{color: red} .error{color: red}
.l {
font-style: normal;
font-weight: normal;
text-decoration: none;
color: gray;
}

View File

@ -296,15 +296,17 @@ mu(application,Node) ->
_ -> _ ->
nil nil
end; end;
mu(function = Class, {tree, function, _, {function, _, [{tree, clause, _, {clause, Vars, _, _}} | _]}}) ->
dehtml('span', [{class,Class}, {arity,length(Vars)}]);
mu(Class,_Node) -> mu(Class,_Node) ->
dehtml('span', [{class,Class}]). dehtml('span', [{class,Class}]).
dehtml(Tag,Atts) -> dehtml(Tag,Atts) ->
flatten([$<,str(Tag),$ ,[[str(A),"=\"",str(V),"\" "]||{A,V}<-Atts],$>]). flatten([$<,str(Tag),$ ,[[str(A),"=\"",str(V),"\" "]||{A,V}<-Atts],$>]).
str(I) when integer(I) -> integer_to_list(I); str(I) when is_integer(I) -> integer_to_list(I);
str(A) when atom(A) -> atom_to_list(A); str(A) when is_atom(A) -> atom_to_list(A);
str(L) when list(L) -> L. str(L) when is_list(L) -> L.
is_guard_or_builtin(atom,1) ->guard; is_guard_or_builtin(atom,1) ->guard;
is_guard_or_builtin(binary,1) ->guard; is_guard_or_builtin(binary,1) ->guard;