File tree Expand file tree Collapse file tree 3 files changed +14
-3
lines changed Expand file tree Collapse file tree 3 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -99,10 +99,13 @@ defmodule ExDoc.Autolink do
99
99
if app in config . apps do
100
100
path <> ext <> suffix
101
101
else
102
+ # TODO: remove this if/when hexdocs.pm starts including .md files
103
+ ext = ".html"
104
+
102
105
config . deps
103
106
|> Keyword . get_lazy ( app , fn -> base_url <> "#{ app } " end )
104
107
|> String . trim_trailing ( "/" )
105
- |> Kernel . <> ( "/" <> path <> ".html" <> suffix )
108
+ |> Kernel . <> ( "/" <> path <> ext <> suffix )
106
109
end
107
110
else
108
111
path <> ext <> suffix
Original file line number Diff line number Diff line change @@ -699,7 +699,11 @@ defmodule ExDoc.Language.Elixir do
699
699
end
700
700
701
701
if url do
702
- ~s[ <a href="#{ url } ">#{ ExDoc.Utils . h ( call_string ) } </a>]
702
+ if config . ext == ".md" do
703
+ ~s[ \[ #{ ExDoc.Utils . h ( call_string ) } \] (#{ url } )]
704
+ else
705
+ ~s[ <a href="#{ url } ">#{ ExDoc.Utils . h ( call_string ) } </a>]
706
+ end
703
707
else
704
708
call_string
705
709
end <> do_typespec ( rest , config )
Original file line number Diff line number Diff line change @@ -695,7 +695,11 @@ defmodule ExDoc.Language.Erlang do
695
695
end
696
696
697
697
if url do
698
- ~s| <a href="#{ url } ">#{ string } </a>(|
698
+ if config . ext == ".md" do
699
+ ~s| [#{ string } \] (#{ url } )(|
700
+ else
701
+ ~s| <a href="#{ url } ">#{ string } </a>(|
702
+ end
699
703
else
700
704
string <> "("
701
705
end
You can’t perform that action at this time.
0 commit comments