From 1970a8a8c2830b2416caa3c863a95011a3d7fe6c Mon Sep 17 00:00:00 2001 From: Onno Vos Date: Wed, 28 Feb 2024 17:52:00 +0100 Subject: [PATCH] Improve links and ensure more links are rendered in the docs --- lib/aws_codegen/docstring.ex | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/aws_codegen/docstring.ex b/lib/aws_codegen/docstring.ex index ec795fb..6486237 100644 --- a/lib/aws_codegen/docstring.ex +++ b/lib/aws_codegen/docstring.ex @@ -283,15 +283,14 @@ defmodule AWS.CodeGen.Docstring do 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 ->