aboutsummaryrefslogtreecommitdiffstats
path: root/make
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2012-05-23 16:44:25 +0200
committerLukas Larsson <[email protected]>2012-07-19 12:24:40 +0200
commit6bb1cd1c9595413cdfd9a8875520e1c85e446833 (patch)
treef0edfcdf63e1f74bfddfb27a776e0f4805e6d97d /make
parent4ba364c5df2c574974fb3ec10fe03f2e6ad4f92f (diff)
downloadotp-6bb1cd1c9595413cdfd9a8875520e1c85e446833.tar.gz
otp-6bb1cd1c9595413cdfd9a8875520e1c85e446833.tar.bz2
otp-6bb1cd1c9595413cdfd9a8875520e1c85e446833.zip
Move README and INSTALL to HOWTO folder
Diffstat (limited to 'make')
-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
%%