aboutsummaryrefslogtreecommitdiffstats
path: root/system/doc/top/src/erl_html_tools.erl
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2016-06-15 11:48:46 +0200
committerRickard Green <[email protected]>2016-06-15 11:48:46 +0200
commit6739b802822b3ba750499b9dc6ac390932d75049 (patch)
tree6606b95ae3f5217d64d2753b654c75cc6e0ffe25 /system/doc/top/src/erl_html_tools.erl
parent59397963e4f1e32b0d11f7862374ac65771feed2 (diff)
parentfe63f7705b5feef0a5eb67a4c3ed47c38301788b (diff)
downloadotp-6739b802822b3ba750499b9dc6ac390932d75049.tar.gz
otp-6739b802822b3ba750499b9dc6ac390932d75049.tar.bz2
otp-6739b802822b3ba750499b9dc6ac390932d75049.zip
Merge branch 'rickard/top-doc-vsn/OTP-13676'
* rickard/top-doc-vsn/OTP-13676: Present OTP base version on top html documentation page
Diffstat (limited to 'system/doc/top/src/erl_html_tools.erl')
-rw-r--r--system/doc/top/src/erl_html_tools.erl28
1 files changed, 14 insertions, 14 deletions
diff --git a/system/doc/top/src/erl_html_tools.erl b/system/doc/top/src/erl_html_tools.erl
index ab58fdf666..d55c2e1164 100644
--- a/system/doc/top/src/erl_html_tools.erl
+++ b/system/doc/top/src/erl_html_tools.erl
@@ -54,24 +54,24 @@ top_index() ->
top_index(src, Value, filename:join(Value, "doc"), RelName)
end.
-top_index([src, RootDir, DestDir, OtpRel])
- when is_atom(RootDir), is_atom(DestDir), is_atom(OtpRel) ->
- top_index(src, atom_to_list(RootDir), atom_to_list(DestDir), atom_to_list(OtpRel));
-top_index([rel, RootDir, DestDir, OtpRel])
- when is_atom(RootDir), is_atom(DestDir), is_atom(OtpRel) ->
- top_index(rel, atom_to_list(RootDir), atom_to_list(DestDir), atom_to_list(OtpRel));
+top_index([src, RootDir, DestDir, OtpBaseVsn])
+ when is_atom(RootDir), is_atom(DestDir), is_atom(OtpBaseVsn) ->
+ top_index(src, atom_to_list(RootDir), atom_to_list(DestDir), atom_to_list(OtpBaseVsn));
+top_index([rel, RootDir, DestDir, OtpBaseVsn])
+ when is_atom(RootDir), is_atom(DestDir), is_atom(OtpBaseVsn) ->
+ top_index(rel, atom_to_list(RootDir), atom_to_list(DestDir), atom_to_list(OtpBaseVsn));
top_index(RootDir) when is_atom(RootDir) ->
{_,RelName} = init:script_id(),
top_index(rel, RootDir, filename:join(RootDir, "doc"), RelName).
-top_index(Source, RootDir, DestDir, OtpRel) ->
+top_index(Source, RootDir, DestDir, OtpBaseVsn) ->
report("****\nRootDir: ~p", [RootDir]),
report("****\nDestDir: ~p", [DestDir]),
- report("****\nOtpRel: ~p", [OtpRel]),
+ report("****\nOtpBaseVsn: ~p", [OtpBaseVsn]),
- put(otp_release, OtpRel),
+ put(otp_base_vsn, OtpBaseVsn),
Templates = find_templates(["","templates",DestDir]),
report("****\nTemplates: ~p", [Templates]),
@@ -81,9 +81,9 @@ top_index(Source, RootDir, DestDir, OtpRel) ->
report("****\nGroups: ~p", [Groups]),
process_templates(Templates, DestDir, Groups).
-top_index_silent(RootDir, DestDir, OtpRel) ->
+top_index_silent(RootDir, DestDir, OtpBaseVsn) ->
put(silent,true),
- Result = top_index(rel, RootDir, DestDir, OtpRel),
+ Result = top_index(rel, RootDir, DestDir, OtpBaseVsn),
erase(silent),
Result.
@@ -361,7 +361,7 @@ subst_template_1(Group, Stream, Info) ->
case file:read(Stream, 100000) of
{ok, Template} ->
Fun = fun(Match, _) -> {subst(Match, Info, Group),Info} end,
- gsub(Template, "#[A-Za-z0-9]+#", Fun, Info);
+ gsub(Template, "#[A-Za-z_0-9]+#", Fun, Info);
{error, Reason} ->
{error, Reason}
end.
@@ -379,8 +379,8 @@ get_version(Info) ->
""
end.
-subst("#release#", _Info, _Group) ->
- get(otp_release);
+subst("#otp_base_vsn#", _Info, _Group) ->
+ get(otp_base_vsn);
subst("#version#", Info, _Group) ->
get_version(Info);
subst("#copyright#", _Info, _Group) ->