Repository: tsutsu3/linkify-it-py

Issue:
Release on conda-forge
If you release on conda-forge, then I'll include in markdown-it-py conda requirements 😄 
(If you don't know, you need to make a PR to https://github.com/conda-forge/staged-recipes)

Comments:

Patch:
diff --git a/README.md b/README.md
index 0763763..bd45d54 100644
--- a/README.md
+++ b/README.md
@@ -2,6 +2,7 @@
 
 [![CI](https://github.com/tsutsu3/linkify-it-py/workflows/CI/badge.svg?branch=main)](https://github.com/tsutsu3/linkify-it-py/actions)
 [![pypi](https://img.shields.io/pypi/v/linkify-it-py)](https://pypi.org/project/linkify-it-py/)
+[![Anaconda-Server Badge](https://anaconda.org/conda-forge/linkify-it-py/badges/version.svg)](https://anaconda.org/conda-forge/linkify-it-py)
 [![codecov](https://codecov.io/gh/tsutsu3/linkify-it-py/branch/main/graph/badge.svg)](https://codecov.io/gh/tsutsu3/linkify-it-py)
 [![Maintainability](https://api.codeclimate.com/v1/badges/6341fd3ec5f05fde392f/maintainability)](https://codeclimate.com/github/tsutsu3/linkify-it-py/maintainability)
 
@@ -25,6 +26,12 @@ Why it's awesome:
 pip install linkify-it-py
 ```
 
+or
+
+```bash
+conda install -c conda-forge linkify-it-py
+```
+
 ## Usage examples
 
 ### Example 1. Simple use
@@ -82,28 +89,28 @@ print(linkify.match("Site tamanegi.onion!"))
 ### Example 3. Add twitter mentions handler
 
 ```python
-from linkify import LinkfiyIt
+from linkify_it import LinkifyIt
 
 
-linkifyit = LinkifyIt()
+linkify = LinkifyIt()
 
-def validate(self, text, pos):
+def validate(obj, text, pos):
     tail = text[pos:]
 
-    if not self.re.get("twitter"):
-        self.re["twitter"] = re.compile(
-            "^([a-zA-Z0-9_]){1,15}(?!_)(?=$|" + self.re["src_ZPCc"] + ")"
+    if not obj.re.get("twitter"):
+        obj.re["twitter"] = re.compile(
+            "^([a-zA-Z0-9_]){1,15}(?!_)(?=$|" + obj.re["src_ZPCc"] + ")"
         )
-    if self.re["twitter"].search(tail):
+    if obj.re["twitter"].search(tail):
         if pos > 2 and tail[pos - 2] == "@":
             return False
-        return len(self.re["twitter"].search(tail).group())
+        return len(obj.re["twitter"].search(tail).group())
     return 0
 
-def normalize(self, m):
-    m.url = "https://twitter.com/" + re.sub(r"^@", "", m.url)
+def normalize(obj, match):
+    match.url = "https://twitter.com/" + re.sub(r"^@", "", match.url)
 
-linkifyit.add("@", {"validate": validate, "normalize": normalize})
+linkify.add("@", {"validate": validate, "normalize": normalize})
 ```
 
 
diff --git a/linkify_it/main.py b/linkify_it/main.py
index 7e6af33..b06a7b3 100644
--- a/linkify_it/main.py
+++ b/linkify_it/main.py
@@ -189,7 +189,7 @@ class LinkifyIt:
 
     def _create_normalizer(self):
         def func(match):
-            self._normalize(match)
+            self.normalize(match)
 
         return func
 
@@ -590,11 +590,11 @@ class LinkifyIt:
         self._compile()
         return self
 
-    def _normalize(self, match):
+    def normalize(self, match):
         """Default normalizer (if schema does not define it's own).
 
         Args:
-            match ():
+            match (:class:`linkify_it.main.Match`): Match result
         """
         if not match.schema:
             match.url = "http://" + match.url


Test patch:
diff --git a/test/test_linkify.py b/test/test_linkify.py
index afa4f00..79bf297 100644
--- a/test/test_linkify.py
+++ b/test/test_linkify.py
@@ -20,7 +20,7 @@ def dummy(_):
 def test_links(number, line, expected):
     linkifyit = LinkifyIt(options={"fuzzy_ip": True})
 
-    linkifyit._normalize = dummy
+    linkifyit.normalize = dummy
 
     assert linkifyit.pretest(line) is True
     assert linkifyit.test("\n" + line + "\n") is True
@@ -35,6 +35,6 @@ def test_links(number, line, expected):
 def test_not_links(number, line, expected):
     linkifyit = LinkifyIt()
 
-    linkifyit._normalize = dummy
+    linkifyit.normalize = dummy
 
     assert linkifyit.test(line) is False