diff --git a/lib/aws_codegen/docstring.ex b/lib/aws_codegen/docstring.ex index 76cf0ba..6486237 100644 --- a/lib/aws_codegen/docstring.ex +++ b/lib/aws_codegen/docstring.ex @@ -274,18 +274,23 @@ defmodule AWS.CodeGen.Docstring do if String.contains?(text, "\n") do "\n```\n#{String.trim_leading(text, "\n")}'''#{@two_break_lines}" else - "`#{text}'" + ## ex_doc blows up on these sorts of things as it sees them as a reference to a function. + ## Just ignore them as they refer to aws-sdk-go based implementations and we don't really care about that + if String.ends_with?(text, "()") do + "" + else + "`#{text}'" + end end - {"a", attrs, children} = html_node -> + {"a", attrs, children} -> case Enum.find(attrs, fn {attr, _} -> attr == "href" end) do {_, href} -> text = Floki.text(children) - if text == href do "[#{href}]" else - html_node + "#{text}: #{href}" end nil -> diff --git a/test/aws_codegen/docstring_test.exs b/test/aws_codegen/docstring_test.exs index b04ee63..3c09b8e 100644 --- a/test/aws_codegen/docstring_test.exs +++ b/test/aws_codegen/docstring_test.exs @@ -211,7 +211,7 @@ defmodule AWS.CodeGen.DocstringTest do """ %% @doc A short description. %% - %% This is a link. + %% This is a link: https://foo.bar. %% This is a `code' and a multiline is here: %% %% ```