rrrene / html_sanitize_ex

HTML sanitizer for Elixir
MIT License
271 stars 62 forks source link

@doc attribute being set multiple times for same function/arity #50

Closed APB9785 closed 3 years ago

APB9785 commented 3 years ago

In scrubber/no_scrub.ex there are three clauses for strip/1 which all attempt to set the @doc attribute for that function. This throws a compiler warning:

warning: redefining @doc attribute previously set at line 15.

Please remove the duplicate docs. If instead you want to override a previously defined @doc, attach the @doc attribute to a function head:

    @doc """
    new docs
    """
    def scrub(...)

  lib/html_sanitize_ex/scrubber/no_scrub.ex:24: HtmlSanitizeEx.Scrubber.NoScrub.scrub/1

warning: redefining @doc attribute previously set at line 15.

Please remove the duplicate docs. If instead you want to override a previously defined @doc, attach the @doc attribute to a function head:

    @doc """
    new docs
    """
    def scrub(...)

  lib/html_sanitize_ex/scrubber/no_scrub.ex:29: HtmlSanitizeEx.Scrubber.NoScrub.scrub/1

Should be an easy fix - I'll submit a PR.

rrrene commented 3 years ago

Thx for reporting this! :+1: It should be be fixed in the latest version.

If it is not, please feel free to re-open this issue!