From 7a53ce9da286d06dd3c190a7a7104e2e47707400 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Thu, 21 Sep 2023 12:30:53 +0200 Subject: [PATCH] Support any String.Chars.t on extras --- lib/ex_doc/formatter/html.ex | 2 +- test/ex_doc/formatter/html_test.exs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ex_doc/formatter/html.ex b/lib/ex_doc/formatter/html.ex index bcec5155c..723fee3f6 100644 --- a/lib/ex_doc/formatter/html.ex +++ b/lib/ex_doc/formatter/html.ex @@ -627,7 +627,7 @@ defmodule ExDoc.Formatter.HTML do {base, text_to_id(Path.rootname(base))} {path, opts} -> - base = path |> Atom.to_string() |> Path.basename() + base = path |> to_string() |> Path.basename() {base, opts[:filename] || text_to_id(Path.rootname(base))} end) end diff --git a/test/ex_doc/formatter/html_test.exs b/test/ex_doc/formatter/html_test.exs index c9d57504c..1e37c4874 100644 --- a/test/ex_doc/formatter/html_test.exs +++ b/test/ex_doc/formatter/html_test.exs @@ -519,7 +519,7 @@ defmodule ExDoc.Formatter.HTMLTest do doc_config(context, extras: [ "test/fixtures/PlainTextFiles.md", - "test/fixtures/LICENSE": [filename: "linked-license"], + {"test/fixtures/LICENSE", filename: "linked-license"}, "test/fixtures/PlainText.txt": [filename: "plain_text"] ] )