Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strip nesting html tags in headers. Closes #705 #706

Merged
merged 1 commit into from May 11, 2017

Conversation

DoumanAsh
Copy link
Contributor

I cannot run tests locally as it seems cmark depends on make tool and i have no means to build it on windows :(

@sourcelevel-bot
Copy link

Hello, @DoumanAsh! This is your first Pull Request that will be reviewed by Ebert, an automatic Code Review service. It will leave comments on this diff with potential issues and style violations found in the code as you push new commits. You can also see all the issues found on this Pull Request on its review page. Please check our documentation for more information.

@@ -209,7 +211,7 @@ defmodule ExDoc.Formatter.HTML.Templates do
@spec header_to_id(String.t) :: String.t
def header_to_id(header) do
header
|> String.replace(~r/<.+>/, "")
|> String.replace(@clean_html_regex, "")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This function is used separately in templates to generate ID.
Therefore proper clean-up is needed here too

Copy link
Member

Choose a reason for hiding this comment

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

Perfect. :)

@josevalim josevalim merged commit eb99675 into elixir-lang:master May 11, 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.

None yet

2 participants