|
@@ -1,6 +1,6 @@
|
|
|
-module(wf_tags).
|
|
|
-author('Maxim Sokhatsky').
|
|
|
--include_lib("n2o/include/wf.hrl").
|
|
|
+-include_lib("nitro/include/nitro.hrl").
|
|
|
-compile(export_all).
|
|
|
-define(VOID(Tag), (Tag == <<"br">> orelse Tag == <<"hr">>
|
|
|
orelse Tag == <<"link">> orelse Tag == <<"img">>
|
|
@@ -21,8 +21,8 @@ display_property({_, undefined}) -> [];
|
|
|
display_property({_, []}) -> [];
|
|
|
display_property({<<"class">>=Id, Value}) -> prop({Id,Value});
|
|
|
display_property({<<"data-toggle">>=Id, Value}) -> prop({Id,Value});
|
|
|
-display_property({Prop, Value}) -> [<<" ">>, wf:to_binary(Prop), <<"=\"">>, wf:to_binary(Value), <<"\"">>].
|
|
|
+display_property({Prop, Value}) -> [<<" ">>, nitro:to_binary(Prop), <<"=\"">>, nitro:to_binary(Value), <<"\"">>].
|
|
|
|
|
|
-prop({Id, Value}) when is_atom(Value) -> [<<" ">>,Id,<<"=\"">>, wf:to_binary(Value), <<"\"">>];
|
|
|
+prop({Id, Value}) when is_atom(Value) -> [<<" ">>,Id,<<"=\"">>, nitro:to_binary(Value), <<"\"">>];
|
|
|
prop({Id, Value}) when is_binary(Value) -> [<<" ">>,Id,<<"=\"">>, Value, <<"\"">>];
|
|
|
-prop({Id, Value}) -> [<<" ">>,Id,<<"=\"">>, string:join([wf:to_list(V) || V <-Value ]," "), <<"\"">>].
|
|
|
+prop({Id, Value}) -> [<<" ">>,Id,<<"=\"">>, string:join([nitro:to_list(V) || V <-Value ]," "), <<"\"">>].
|