From f3f60f05cc10391651388a18ae4f81404422e545 Mon Sep 17 00:00:00 2001 From: eksperimental Date: Fri, 21 Dec 2018 11:00:17 +0700 Subject: [PATCH] Use em-dash for separation in page title ...instead of en-dash. --- lib/ex_doc/formatter/html/templates/head_template.eex | 2 +- lib/ex_doc/formatter/html/templates/redirect_template.eex | 2 +- test/ex_doc/formatter/html_test.exs | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/ex_doc/formatter/html/templates/head_template.eex b/lib/ex_doc/formatter/html/templates/head_template.eex index 376b4ac7a..325dd90d1 100644 --- a/lib/ex_doc/formatter/html/templates/head_template.eex +++ b/lib/ex_doc/formatter/html/templates/head_template.eex @@ -5,7 +5,7 @@ - <%= page.title %> – <%= config.project %> v<%= config.version %> + <%= page.title %> — <%= config.project %> v<%= config.version %> " /> <%= if config.canonical do %> diff --git a/lib/ex_doc/formatter/html/templates/redirect_template.eex b/lib/ex_doc/formatter/html/templates/redirect_template.eex index aec7172b0..b5804c7f5 100644 --- a/lib/ex_doc/formatter/html/templates/redirect_template.eex +++ b/lib/ex_doc/formatter/html/templates/redirect_template.eex @@ -2,7 +2,7 @@ - <%= config.project %> v<%= config.version %> – Documentation + <%= config.project %> v<%= config.version %> — Documentation diff --git a/test/ex_doc/formatter/html_test.exs b/test/ex_doc/formatter/html_test.exs index dde5cc752..428d0f1c9 100644 --- a/test/ex_doc/formatter/html_test.exs +++ b/test/ex_doc/formatter/html_test.exs @@ -132,12 +132,12 @@ defmodule ExDoc.Formatter.HTMLTest do generator: ~r{} }, index: %{ - title: ~r{Elixir v1.0.1 – Documentation}, + title: ~r{Elixir v1.0.1 — Documentation}, index: ~r{} }, module: %{ - title: ~r{RandomError – Elixir v1.0.1}, + title: ~r{RandomError — Elixir v1.0.1}, viewport: ~r{}, x_ua: ~r{} } @@ -348,7 +348,7 @@ defmodule ExDoc.Formatter.HTMLTest do test "with custom title" do generate_docs(doc_config(extras: ["test/fixtures/README.md": [title: "Getting Started"]])) content = File.read!("#{output_dir()}/readme.html") - assert content =~ ~r{Getting Started – Elixir v1.0.1} + assert content =~ ~r{Getting Started — Elixir v1.0.1} content = read_wildcard!("#{output_dir()}/dist/sidebar_items-*.js") assert content =~ ~r{"id":"readme","title":"Getting Started","group":""} end @@ -367,7 +367,7 @@ defmodule ExDoc.Formatter.HTMLTest do test "with auto-extracted titles" do generate_docs(doc_config(extras: ["test/fixtures/ExtraPage.md"])) content = File.read!("#{output_dir()}/extrapage.html") - assert content =~ ~r{Extra Page Title – Elixir v1.0.1} + assert content =~ ~r{Extra Page Title — Elixir v1.0.1} content = read_wildcard!("#{output_dir()}/dist/sidebar_items-*.js") assert content =~ ~r{"id":"extrapage","title":"Extra Page Title"} end