Compare commits

..

15 Commits
0.5.0 ... 0.5.2

Author SHA1 Message Date
AlexVonB
ae50065872 Merge branch 'develop' 2020-08-18 18:53:10 +02:00
AlexVonB
19e2c3db0d Bump version 0.5.2 2020-08-18 18:52:53 +02:00
AlexVonB
ba51bbee12 Merge pull request #22 from SimonIT/ol-start-attribute
Support the start attribute for ordered lists
2020-08-18 18:44:59 +02:00
AlexVonB
9f3d497053 use python3.6 for linting 2020-08-18 18:41:46 +02:00
AlexVonB
d2fc689b66 set max flake8 version again3 2020-08-18 18:39:20 +02:00
AlexVonB
ab78385b56 set max flake8 version again2 2020-08-18 18:38:17 +02:00
AlexVonB
9ebf726e78 set max flake8 version again 2020-08-18 18:37:39 +02:00
AlexVonB
3f8403aa7a set max flake8 version 2020-08-18 18:35:31 +02:00
AlexVonB
5b6e76f984 Create python-app.yml 2020-08-18 18:30:55 +02:00
SimonIT
ca98892953 Support the start attribute for ordered lists 2020-08-11 11:43:02 +02:00
AlexVonB
0dc281e6ea Bump version 0.5.1 2020-08-11 09:51:04 +02:00
AlexVonB
4e6e20e756 Merge pull request #21 from matthewwithanm/python-publish
Create python-publish.yml
2020-08-11 09:49:29 +02:00
Matthew Dapena-Tretter
9358522c73 Create python-publish.yml
Add workflow for publishing to PyPI.
2020-08-10 19:42:48 -07:00
AlexVonB
1078610066 ignore build folder 2020-08-10 13:03:12 +02:00
AlexVonB
d23dbc77e4 Merge branch 'master' into develop 2020-08-10 13:01:34 +02:00
6 changed files with 72 additions and 2 deletions

33
.github/workflows/python-app.yml vendored Normal file
View File

@@ -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.6
uses: actions/setup-python@v2
with:
python-version: 3.6
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8==2.5.4 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

31
.github/workflows/python-publish.yml vendored Normal file
View File

@@ -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/*

1
.gitignore vendored
View File

@@ -7,3 +7,4 @@
/dist
/MANIFEST
/venv
build/

View File

@@ -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:

View File

@@ -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.2',
}

View File

@@ -123,6 +123,7 @@ def test_i():
def test_ol():
assert md('<ol><li>a</li><li>b</li></ol>') == '\n1. a\n2. b\n\n'
assert md('<ol start="3"><li>a</li><li>b</li></ol>') == '\n3. a\n4. b\n\n'
def test_p():