~netlandish/django-wiki

caf0b9e4a04dab0942c5c1fb72430f12bac51411 — Mads Jensen 5 years ago dc49edb
Fixed some lint warnings.
M src/wiki/plugins/attachments/markdown_extensions.py => src/wiki/plugins/attachments/markdown_extensions.py +1 -1
@@ 88,7 88,7 @@ class AttachmentPreprocessor(markdown.preprocessors.Preprocessor):
                ).format(attachment_id)
                line = line.replace(
                    '[' + m.group(2) + ']',
                        self.markdown.htmlStash.store(html)
                    self.markdown.htmlStash.store(html)
                )
            new_text.append(before + line + after)
        return new_text

M src/wiki/plugins/links/mdx/urlize.py => src/wiki/plugins/links/mdx/urlize.py +1 -1
@@ 155,7 155,7 @@ class UrlizePattern(markdown.inlinepatterns.Pattern):
        el = markdown.util.etree.Element("a")
        el.set('href', url)
        el.set('target', '_blank')
        el.set('rel', 'nofollow')     
        el.set('rel', 'nofollow')
        el.append(icon)
        el.append(span_text)


M src/wiki/plugins/macros/mdx/wikilinks.py => src/wiki/plugins/macros/mdx/wikilinks.py +1 -0
@@ 57,6 57,7 @@ class WikiLinks(wikilinks.WikiLinksInlineProcessor):
            a.set('class', html_class)
        return a, m.start(0), m.end(0)


def makeExtension(*args, **kwargs):
    """Return an instance of the extension."""
    return WikiLinkExtension(*args, **kwargs)

M tests/plugins/links/test_urlize.py => tests/plugins/links/test_urlize.py +3 -4
@@ 1,5 1,4 @@
import html
from unittest import mock

import markdown
import pytest


@@ 151,15 150,15 @@ FIXTURE_NEGATIVE_MATCHES = [
        '<p>localhosts</p>'
    ),
    (
        'localhost', 
        'localhost',
        '<p>localhost</p>'

    ),
    (
        'localhost:8000', 
        'localhost:8000',
        '<p>localhost:8000</p>'
    ),
   

    # Incomplete FQDNs.
    (
        'example.',