aboutsummaryrefslogtreecommitdiffstats
path: root/make/emd2exml.in
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2012-07-19 15:38:11 +0200
committerLukas Larsson <[email protected]>2012-07-19 15:38:11 +0200
commit0948779bd59c07653b157789c2edfd67892d3958 (patch)
tree2c658969acc752ad7efdbdc866bdc4af60110b5c /make/emd2exml.in
parent075ecdf8d78876d994b5e441e0da158a8cbd9898 (diff)
parentd26f31992baae77d6fd3fa063f22ee8ace33792c (diff)
downloadotp-0948779bd59c07653b157789c2edfd67892d3958.tar.gz
otp-0948779bd59c07653b157789c2edfd67892d3958.tar.bz2
otp-0948779bd59c07653b157789c2edfd67892d3958.zip
Merge branch 'lukas/add-howto-folder/OTP-10154'
* lukas/add-howto-folder/OTP-10154: Add a testing HOWTO Move README and INSTALL to HOWTO folder Fix missing accounting for outbound distribution bytes.
Diffstat (limited to 'make/emd2exml.in')
-rw-r--r--make/emd2exml.in16
1 files changed, 14 insertions, 2 deletions
diff --git a/make/emd2exml.in b/make/emd2exml.in
index 16c38379d9..5bf7758be3 100644
--- a/make/emd2exml.in
+++ b/make/emd2exml.in
@@ -994,7 +994,7 @@ resolve_link([_|Cs], start, "", "", "") ->
resolve_link(Cs, start, "", "", "");
resolve_link("]:" ++ Rest, key, Yek, "", "") ->
resolve_link(Rest, url, Yek, "", "");
-resolve_link([C|Cs], url, Yek, Lru, "") when C == $"; C == $' ->
+resolve_link([C|Cs], url, Yek, Lru, "") when C == $"; C == $' -> %"
resolve_link(Cs, {title, C}, Yek, Lru, "");
resolve_link([$(|Cs], url, Yek, Lru, "") ->
resolve_link(Cs, {title, $)}, Yek, Lru, "");
@@ -1010,9 +1010,21 @@ resolve_link([_|Cs], drop, Yek, Lru, Eltit) ->
resolve_link(Cs, drop, Yek, Lru, Eltit);
resolve_link([], _, Yek, Lru, Eltit) ->
{ws_strip(lists:reverse(Yek)),
- ws_strip(lists:reverse(Lru)),
+ ws_strip(md_strip_n_reverse(Lru)),
ws_strip(lists:reverse(Eltit))}.
+%% Remove .md at end of references.
+md_strip_n_reverse(Lru) ->
+ md_strip_n_reverse(Lru,[]).
+md_strip_n_reverse("\ndm."++Lru,Acc) ->
+ md_strip_n_reverse(Lru,Acc);
+md_strip_n_reverse("#dm."++Lru,Acc) ->
+ md_strip_n_reverse(Lru,[$#|Acc]);
+md_strip_n_reverse([C|T],Acc) ->
+ md_strip_n_reverse(T,[C|Acc]);
+md_strip_n_reverse([], Acc) ->
+ Acc.
+
%%
%% Misc
%%