From 28e447d9ae26d3c1ee2bc4a268823bdaf67e2312 Mon Sep 17 00:00:00 2001 From: AlexVonB Date: Thu, 11 Jul 2019 23:26:45 +0200 Subject: [PATCH 01/21] remove prefixed and suffixed spaces from inline tags fixes matthewwithanm#13 --- markdownify/__init__.py | 26 +++++++++++++++++++++++--- tests/test_conversions.py | 26 ++++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 3 deletions(-) diff --git a/markdownify/__init__.py b/markdownify/__init__.py index 12be28e..43c32ca 100644 --- a/markdownify/__init__.py +++ b/markdownify/__init__.py @@ -22,6 +22,17 @@ def escape(text): return '' return text.replace('_', r'\_') +def chomp(text): + """ + If the text in an inline tag like b, a, or em contains a leading or trailing + space, strip the string and return a space as suffix of prefix, if needed. + This function is used to prevent conversions like + foo => ** foo** + """ + prefix = ' ' if text and text[0] == ' ' else '' + suffix = ' ' if text and text[-1] == ' ' else '' + text = text.strip() + return (prefix, suffix, text) def _todict(obj): return dict((k, getattr(obj, k)) for k in dir(obj) if not k.startswith('_')) @@ -110,13 +121,16 @@ class MarkdownConverter(object): return '%s\n%s\n\n' % (text, pad_char * len(text)) if text else '' def convert_a(self, el, text): + prefix, suffix, text = chomp(text) + if not text: + return '' href = el.get('href') title = el.get('title') if self.options['autolinks'] and text == href and not title: # Shortcut syntax return '<%s>' % href title_part = ' "%s"' % title.replace('"', r'\"') if title else '' - return '[%s](%s%s)' % (text or '', href, title_part) if href else text or '' + return '%s[%s](%s%s)%s' % (prefix, text or '', href, title_part, suffix) if href else text or '' def convert_b(self, el, text): return self.convert_strong(el, text) @@ -128,7 +142,10 @@ class MarkdownConverter(object): return ' \n' def convert_em(self, el, text): - return '*%s*' % text if text else '' + prefix, suffix, text = chomp(text) + if not text: + return '' + return '%s*%s*%s' % (prefix, text if text else '', suffix) def convert_hn(self, n, el, text): style = self.options['heading_style'] @@ -176,7 +193,10 @@ class MarkdownConverter(object): return '%s\n\n' % text if text else '' def convert_strong(self, el, text): - return '**%s**' % text if text else '' + prefix, suffix, text = chomp(text) + if not text: + return '' + return '%s**%s**%s' % (prefix, text if text else '', suffix) def convert_img(self, el, text): alt = el.attrs.get('alt', None) or '' diff --git a/tests/test_conversions.py b/tests/test_conversions.py index af4b54f..1d577ec 100644 --- a/tests/test_conversions.py +++ b/tests/test_conversions.py @@ -21,10 +21,24 @@ nested_uls = re.sub('\s+', '', """
  • 3
  • """) +def test_chomp(): + assert md(' ') == ' ' + assert md(' ') == ' ' + assert md(' ') == ' ' + assert md(' ') == ' ' + assert md(' s ') == ' **s** ' + assert md(' s ') == ' **s** ' + assert md(' s ') == ' **s** ' + assert md(' s ') == ' **s** ' def test_a(): assert md('Google') == '[Google](http://google.com)' +def test_a_spaces(): + assert md('foo Google bar') == 'foo [Google](http://google.com) bar' + assert md('foo Google bar') == 'foo [Google](http://google.com) bar' + assert md('foo Google bar') == 'foo [Google](http://google.com) bar' + assert md('foo bar') == 'foo bar' def test_a_with_title(): text = md('Google') @@ -44,6 +58,12 @@ def test_a_no_autolinks(): def test_b(): assert md('Hello') == '**Hello**' +def test_b_spaces(): + assert md('foo Hello bar') == 'foo **Hello** bar' + assert md('foo Hello bar') == 'foo **Hello** bar' + assert md('foo Hello bar') == 'foo **Hello** bar' + assert md('foo bar') == 'foo bar' + def test_blockquote(): assert md('
    Hello
    ').strip() == '> Hello' @@ -61,6 +81,12 @@ def test_br(): def test_em(): assert md('Hello') == '*Hello*' +def test_em_spaces(): + assert md('foo Hello bar') == 'foo *Hello* bar' + assert md('foo Hello bar') == 'foo *Hello* bar' + assert md('foo Hello bar') == 'foo *Hello* bar' + assert md('foo bar') == 'foo bar' + def test_h1(): assert md('

    Hello

    ') == 'Hello\n=====\n\n' From 5563161c865ee75c853b19242279dc8fd0c471ff Mon Sep 17 00:00:00 2001 From: AlexVonB Date: Fri, 12 Jul 2019 10:23:17 +0200 Subject: [PATCH 02/21] remove needless checks for emtpy text --- markdownify/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/markdownify/__init__.py b/markdownify/__init__.py index 43c32ca..e02f4e7 100644 --- a/markdownify/__init__.py +++ b/markdownify/__init__.py @@ -130,7 +130,7 @@ class MarkdownConverter(object): # Shortcut syntax return '<%s>' % href title_part = ' "%s"' % title.replace('"', r'\"') if title else '' - return '%s[%s](%s%s)%s' % (prefix, text or '', href, title_part, suffix) if href else text or '' + return '%s[%s](%s%s)%s' % (prefix, text, href, title_part, suffix) if href else text def convert_b(self, el, text): return self.convert_strong(el, text) @@ -145,7 +145,7 @@ class MarkdownConverter(object): prefix, suffix, text = chomp(text) if not text: return '' - return '%s*%s*%s' % (prefix, text if text else '', suffix) + return '%s*%s*%s' % (prefix, text, suffix) def convert_hn(self, n, el, text): style = self.options['heading_style'] @@ -196,7 +196,7 @@ class MarkdownConverter(object): prefix, suffix, text = chomp(text) if not text: return '' - return '%s**%s**%s' % (prefix, text if text else '', suffix) + return '%s**%s**%s' % (prefix, text, suffix) def convert_img(self, el, text): alt = el.attrs.get('alt', None) or '' From b747378b52163c7e0e369c74abb0a486ddfb1e81 Mon Sep 17 00:00:00 2001 From: AlexVonB Date: Sun, 9 Aug 2020 21:11:16 +0200 Subject: [PATCH 03/21] fixed nested lists and wrote correct tests nested lists did not work: after a nested list was over, a new line was inserted. this leads to a large gap before the rest of the parent list. lists are prefixed and suffixed with a single newline, this is now represented in the tests. --- markdownify/__init__.py | 3 ++- tests/test_conversions.py | 14 +++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/markdownify/__init__.py b/markdownify/__init__.py index d126cae..4a44737 100644 --- a/markdownify/__init__.py +++ b/markdownify/__init__.py @@ -169,7 +169,8 @@ class MarkdownConverter(object): break el = el.parent if nested: - text = '\n' + self.indent(text, 1) + # remove trailing newline if nested + return '\n' + self.indent(text, 1).rstrip() return '\n' + text + '\n' convert_ul = convert_list diff --git a/tests/test_conversions.py b/tests/test_conversions.py index 2526af3..853ed66 100644 --- a/tests/test_conversions.py +++ b/tests/test_conversions.py @@ -2,7 +2,7 @@ from markdownify import markdownify as md, ATX, ATX_CLOSED import re -nested_uls = re.sub('\s+', '', """ +nested_uls = re.sub(r'\s+', '', """
    • 1
        @@ -116,7 +116,7 @@ def test_i(): def test_ol(): - assert md('
        1. a
        2. b
        ') == '1. a\n2. b\n' + assert md('
        1. a
        2. b
        ') == '\n1. a\n2. b\n\n' def test_p(): @@ -128,10 +128,10 @@ def test_strong(): def test_ul(): - assert md('
        • a
        • b
        ') == '* a\n* b\n' - + assert md('
        • a
        • b
        ') == '\n* a\n* b\n\n' + def test_inline_ul(): - assert md('

        foo

        • a
        • b

        bar

        ') == 'foo \n* a\n* b\n\nbar' + assert md('

        foo

        • a
        • b

        bar

        ') == 'foo\n\n\n* a\n* b\n\nbar\n\n' def test_nested_uls(): @@ -139,11 +139,11 @@ def test_nested_uls(): Nested ULs should alternate bullet characters. """ - assert md(nested_uls) == '* 1\n\t+ a\n\t\t- I\n\t\t- II\n\t\t- III\n\t\t\n\t+ b\n\t+ c\n\t\n* 2\n* 3\n' + assert md(nested_uls) == '\n* 1\n\t+ a\n\t\t- I\n\t\t- II\n\t\t- III\n\t+ b\n\t+ c\n* 2\n* 3\n\n' def test_bullets(): - assert md(nested_uls, bullets='-') == '- 1\n\t- a\n\t\t- I\n\t\t- II\n\t\t- III\n\t\t\n\t- b\n\t- c\n\t\n- 2\n- 3\n' + assert md(nested_uls, bullets='-') == '\n- 1\n\t- a\n\t\t- I\n\t\t- II\n\t\t- III\n\t- b\n\t- c\n- 2\n- 3\n\n' def test_img(): From 3b049cdb9ca597c7e1458538b74ade3630e4a12f Mon Sep 17 00:00:00 2001 From: AlexVonB Date: Sun, 9 Aug 2020 21:13:33 +0200 Subject: [PATCH 04/21] added egg dirs to gitignore --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index ae9fdc5..8350118 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,7 @@ *.pyc *.egg +.eggs/ +*.egg-info/ .DS_Store /.env /dist From aceced68eb4cafba2aaf77636200764d0553317c Mon Sep 17 00:00:00 2001 From: AlexVonB Date: Sun, 9 Aug 2020 21:17:39 +0200 Subject: [PATCH 05/21] cleaning up changes with help of linter --- markdownify/__init__.py | 2 ++ tests/test_conversions.py | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/markdownify/__init__.py b/markdownify/__init__.py index 4a44737..56854e8 100644 --- a/markdownify/__init__.py +++ b/markdownify/__init__.py @@ -22,6 +22,7 @@ def escape(text): return '' return text.replace('_', r'\_') + def chomp(text): """ If the text in an inline tag like b, a, or em contains a leading or trailing @@ -34,6 +35,7 @@ def chomp(text): text = text.strip() return (prefix, suffix, text) + def _todict(obj): return dict((k, getattr(obj, k)) for k in dir(obj) if not k.startswith('_')) diff --git a/tests/test_conversions.py b/tests/test_conversions.py index 853ed66..b8487e5 100644 --- a/tests/test_conversions.py +++ b/tests/test_conversions.py @@ -21,6 +21,7 @@ nested_uls = re.sub(r'\s+', '', """
      • 3
      """) + def test_chomp(): assert md(' ') == ' ' assert md(' ') == ' ' @@ -31,15 +32,18 @@ def test_chomp(): assert md(' s ') == ' **s** ' assert md(' s ') == ' **s** ' + def test_a(): assert md('Google') == '[Google](http://google.com)' + def test_a_spaces(): assert md('foo Google bar') == 'foo [Google](http://google.com) bar' assert md('foo Google bar') == 'foo [Google](http://google.com) bar' assert md('foo Google bar') == 'foo [Google](http://google.com) bar' assert md('foo bar') == 'foo bar' + def test_a_with_title(): text = md('Google') assert text == r'[Google](http://google.com "The \"Goog\"")' @@ -58,6 +62,7 @@ def test_a_no_autolinks(): def test_b(): assert md('Hello') == '**Hello**' + def test_b_spaces(): assert md('foo Hello bar') == 'foo **Hello** bar' assert md('foo Hello bar') == 'foo **Hello** bar' @@ -81,6 +86,7 @@ def test_br(): def test_em(): assert md('Hello') == '*Hello*' + def test_em_spaces(): assert md('foo Hello bar') == 'foo *Hello* bar' assert md('foo Hello bar') == 'foo *Hello* bar' @@ -130,6 +136,7 @@ def test_strong(): def test_ul(): assert md('
      • a
      • b
      ') == '\n* a\n* b\n\n' + def test_inline_ul(): assert md('

      foo

      • a
      • b

      bar

      ') == 'foo\n\n\n* a\n* b\n\nbar\n\n' From 0c4b856b9c3766220b62ce71a871c1dc1a909fba Mon Sep 17 00:00:00 2001 From: AlexVonB Date: Sun, 9 Aug 2020 21:22:08 +0200 Subject: [PATCH 06/21] Bump to 0.5.0 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index ea57c27..57c2edf 100644 --- a/setup.py +++ b/setup.py @@ -10,7 +10,7 @@ read = lambda filepath: codecs.open(filepath, 'r', 'utf-8').read() pkgmeta = { '__title__': 'markdownify', '__author__': 'Matthew Tretter', - '__version__': '0.4.1', + '__version__': '0.5.0', } From 1078610066e4a163f9b37f0aead31dbb72ee238e Mon Sep 17 00:00:00 2001 From: AlexVonB Date: Mon, 10 Aug 2020 13:03:12 +0200 Subject: [PATCH 07/21] ignore build folder --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 8350118..8817941 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ /dist /MANIFEST /venv +build/ From 8b882ca3c994f9b3fce7cd95bd927dec17e5ce38 Mon Sep 17 00:00:00 2001 From: SimonIT Date: Mon, 10 Aug 2020 16:24:00 +0200 Subject: [PATCH 08/21] Add some fancy badges --- README.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.rst b/README.rst index 4e93b92..9becee1 100644 --- a/README.rst +++ b/README.rst @@ -1,3 +1,7 @@ +.. image:: https://img.shields.io/pypi/v/markdownify :alt: PyPI +.. image:: https://img.shields.io/pypi/l/markdownify :alt: PyPI - License +.. image:: https://img.shields.io/pypi/dm/markdownify :alt: PyPI - Downloads + Installation ============ From 28d7a22da3710310182850bd3d4350eab7aea699 Mon Sep 17 00:00:00 2001 From: SimonIT Date: Mon, 10 Aug 2020 17:42:18 +0200 Subject: [PATCH 09/21] Remove alt because it makes some trouble --- README.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.rst b/README.rst index 9becee1..2769146 100644 --- a/README.rst +++ b/README.rst @@ -1,6 +1,6 @@ -.. image:: https://img.shields.io/pypi/v/markdownify :alt: PyPI -.. image:: https://img.shields.io/pypi/l/markdownify :alt: PyPI - License -.. image:: https://img.shields.io/pypi/dm/markdownify :alt: PyPI - Downloads +.. image:: https://img.shields.io/pypi/v/markdownify +.. image:: https://img.shields.io/pypi/l/markdownify +.. image:: https://img.shields.io/pypi/dm/markdownify Installation ============ From 9358522c731e84b22c74761f8efa668f953d316a Mon Sep 17 00:00:00 2001 From: Matthew Dapena-Tretter Date: Mon, 10 Aug 2020 19:42:48 -0700 Subject: [PATCH 10/21] Create python-publish.yml Add workflow for publishing to PyPI. --- .github/workflows/python-publish.yml | 31 ++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/python-publish.yml diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml new file mode 100644 index 0000000..1a03a7b --- /dev/null +++ b/.github/workflows/python-publish.yml @@ -0,0 +1,31 @@ +# This workflow will upload a Python Package using Twine when a release is created +# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries + +name: Upload Python Package + +on: + release: + types: [created] + +jobs: + deploy: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.x' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install setuptools wheel twine + - name: Build and publish + env: + TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} + TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + run: | + python setup.py sdist bdist_wheel + twine upload dist/* From 0dc281e6eac397212f63a3598eb552560f4d0bdb Mon Sep 17 00:00:00 2001 From: AlexVonB Date: Tue, 11 Aug 2020 09:51:04 +0200 Subject: [PATCH 11/21] Bump version 0.5.1 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 57c2edf..3c9e3ea 100644 --- a/setup.py +++ b/setup.py @@ -10,7 +10,7 @@ read = lambda filepath: codecs.open(filepath, 'r', 'utf-8').read() pkgmeta = { '__title__': 'markdownify', '__author__': 'Matthew Tretter', - '__version__': '0.5.0', + '__version__': '0.5.1', } From ca988929534bb3c3c3eec718be63af28510b5cfd Mon Sep 17 00:00:00 2001 From: SimonIT Date: Tue, 11 Aug 2020 11:43:02 +0200 Subject: [PATCH 12/21] Support the start attribute for ordered lists --- markdownify/__init__.py | 6 +++++- tests/test_conversions.py | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/markdownify/__init__.py b/markdownify/__init__.py index 56854e8..33d5b8f 100644 --- a/markdownify/__init__.py +++ b/markdownify/__init__.py @@ -181,7 +181,11 @@ class MarkdownConverter(object): def convert_li(self, el, text): parent = el.parent if parent is not None and parent.name == 'ol': - bullet = '%s.' % (parent.index(el) + 1) + if parent.get("start"): + start = int(parent.get("start")) + else: + start = 1 + bullet = '%s.' % (start + parent.index(el)) else: depth = -1 while el: diff --git a/tests/test_conversions.py b/tests/test_conversions.py index b8487e5..9e7be24 100644 --- a/tests/test_conversions.py +++ b/tests/test_conversions.py @@ -123,6 +123,7 @@ def test_i(): def test_ol(): assert md('
      1. a
      2. b
      ') == '\n1. a\n2. b\n\n' + assert md('
      1. a
      2. b
      ') == '\n3. a\n4. b\n\n' def test_p(): From 04711027e639c699b1fddc79c8b5faaf3665a1e4 Mon Sep 17 00:00:00 2001 From: SimonIT Date: Thu, 13 Aug 2020 20:11:18 +0200 Subject: [PATCH 13/21] Replace downloads badge --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 2769146..299d214 100644 --- a/README.rst +++ b/README.rst @@ -1,6 +1,6 @@ .. image:: https://img.shields.io/pypi/v/markdownify .. image:: https://img.shields.io/pypi/l/markdownify -.. image:: https://img.shields.io/pypi/dm/markdownify +.. image:: https://pepy.tech/badge/markdownify Installation ============ From 5b6e76f984b50110e13ffde73d158733a1407f70 Mon Sep 17 00:00:00 2001 From: AlexVonB Date: Tue, 18 Aug 2020 18:30:55 +0200 Subject: [PATCH 14/21] Create python-app.yml --- .github/workflows/python-app.yml | 33 ++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/python-app.yml diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml new file mode 100644 index 0000000..ba26197 --- /dev/null +++ b/.github/workflows/python-app.yml @@ -0,0 +1,33 @@ +# This workflow will install Python dependencies, run tests and lint with a single version of Python +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions + +name: Python application + +on: + push: + branches: [ develop ] + pull_request: + branches: [ develop ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up Python 3.8 + uses: actions/setup-python@v2 + with: + python-version: 3.8 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install flake8 pytest + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + - name: Lint with flake8 + run: | + python setup.py lint + - name: Test with pytest + run: | + python setup.py test From 3f8403aa7ab0e26f6e7debb6d15b752ec68084c4 Mon Sep 17 00:00:00 2001 From: AlexVonB Date: Tue, 18 Aug 2020 18:35:31 +0200 Subject: [PATCH 15/21] set max flake8 version --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 3c9e3ea..69c56fa 100644 --- a/setup.py +++ b/setup.py @@ -70,7 +70,7 @@ setup( zip_safe=False, include_package_data=True, setup_requires=[ - 'flake8', + 'flake8<3', ], tests_require=[ 'pytest', From 9ebf726e78fbffb8a34a4fe6821fbd99c24e108a Mon Sep 17 00:00:00 2001 From: AlexVonB Date: Tue, 18 Aug 2020 18:37:39 +0200 Subject: [PATCH 16/21] set max flake8 version again --- .github/workflows/python-app.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index ba26197..3dcd286 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -23,7 +23,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install flake8 pytest + pip install flake8=2.5.4 pytest if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - name: Lint with flake8 run: | From ab78385b568cc84f3b6a27dd4f852f521ba0da4f Mon Sep 17 00:00:00 2001 From: AlexVonB Date: Tue, 18 Aug 2020 18:38:17 +0200 Subject: [PATCH 17/21] set max flake8 version again2 --- .github/workflows/python-app.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 3dcd286..36a336d 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -23,7 +23,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install flake8=2.5.4 pytest + pip install flake8==2.5.4 pytest if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - name: Lint with flake8 run: | From d2fc689b66016bbb9d0dc52ab3196f97a50172dd Mon Sep 17 00:00:00 2001 From: AlexVonB Date: Tue, 18 Aug 2020 18:39:20 +0200 Subject: [PATCH 18/21] set max flake8 version again3 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 69c56fa..3c9e3ea 100644 --- a/setup.py +++ b/setup.py @@ -70,7 +70,7 @@ setup( zip_safe=False, include_package_data=True, setup_requires=[ - 'flake8<3', + 'flake8', ], tests_require=[ 'pytest', From 9f3d497053ceb629a6777cb51c6becf885dbdd00 Mon Sep 17 00:00:00 2001 From: AlexVonB Date: Tue, 18 Aug 2020 18:41:46 +0200 Subject: [PATCH 19/21] use python3.6 for linting --- .github/workflows/python-app.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 36a336d..41240f8 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -16,10 +16,10 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Set up Python 3.8 + - name: Set up Python 3.6 uses: actions/setup-python@v2 with: - python-version: 3.8 + python-version: 3.6 - name: Install dependencies run: | python -m pip install --upgrade pip From 19e2c3db0da3282f8ba1aaa6c0f9986c9c99e1f2 Mon Sep 17 00:00:00 2001 From: AlexVonB Date: Tue, 18 Aug 2020 18:52:53 +0200 Subject: [PATCH 20/21] Bump version 0.5.2 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 3c9e3ea..06ab404 100644 --- a/setup.py +++ b/setup.py @@ -10,7 +10,7 @@ read = lambda filepath: codecs.open(filepath, 'r', 'utf-8').read() pkgmeta = { '__title__': 'markdownify', '__author__': 'Matthew Tretter', - '__version__': '0.5.1', + '__version__': '0.5.2', } From a4461161bc6a2c1860d825aaa64c2a04bfbf5c53 Mon Sep 17 00:00:00 2001 From: SimonIT Date: Wed, 19 Aug 2020 10:06:21 +0200 Subject: [PATCH 21/21] Make badges inline --- README.rst | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/README.rst b/README.rst index 299d214..4d21411 100644 --- a/README.rst +++ b/README.rst @@ -1,6 +1,20 @@ -.. image:: https://img.shields.io/pypi/v/markdownify -.. image:: https://img.shields.io/pypi/l/markdownify -.. image:: https://pepy.tech/badge/markdownify +|build| |version| |license| |downloads| + +.. |build| image:: https://img.shields.io/github/workflow/status/matthewwithanm/python-markdownify/Python%20application/develop + :alt: GitHub Workflow Status + :target: https://github.com/matthewwithanm/python-markdownify/actions?query=workflow%3A%22Python+application%22 + +.. |version| image:: https://img.shields.io/pypi/v/markdownify + :alt: Pypi version + :target: https://pypi.org/project/markdownify/ + +.. |license| image:: https://img.shields.io/pypi/l/markdownify + :alt: License + :target: https://github.com/matthewwithanm/python-markdownify/blob/develop/LICENSE + +.. |downloads| image:: https://pepy.tech/badge/markdownify + :alt: Pypi Downloads + :target: https://pepy.tech/project/markdownify Installation ============