Skip to content

Conversation

milmazz
Copy link
Member

@milmazz milmazz commented May 27, 2017

No description provided.

generate_docs(doc_config())

content = File.read!("#{output_dir()}/api-reference.html")
content = File.read!("#{output_dir()}/api-reference.html") |> normalize_eol()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use a function call when a pipeline is only one function long

@milmazz milmazz force-pushed the unit_tests_windows branch from 4796243 to 854ea7f Compare May 27, 2017 04:19
generate_docs_and_unzip(config)

content = File.read!("#{output_dir()}/OEBPS/readme.xhtml")
content = "#{output_dir()}/OEBPS/readme.xhtml" |> File.read!() |> normalize_eol()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this? None of those seem to be asserting on new lines?


test "site title text links to homepage_url when set" do
content = Templates.sidebar_template(doc_config(), @empty_nodes_map)
content = doc_config() |> Templates.sidebar_template(@empty_nodes_map) |> normalize_eol()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need this. We should just remove \n from the regexes below because \s matches any space and we don't actually care in HTML if it is a new line or a regular space:

"a\r\nb" =~ ~r/a\s*b/
true

@josevalim
Copy link
Member

Hi @milmazz! I think instead of doing the eol conversion, we can adjust the regexes instead. What do you think?

@milmazz
Copy link
Member Author

milmazz commented May 31, 2017

@josevalim Definitely better! Thanks for your suggestions.

@milmazz milmazz merged commit f560200 into elixir-lang:master Jun 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants