Skip to content

Commit

Permalink
Merge 4bee7be into 4f32530
Browse files Browse the repository at this point in the history
  • Loading branch information
sivakov512 committed Apr 4, 2019
2 parents 4f32530 + 4bee7be commit e7cb87f
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 24 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Expand Up @@ -3,7 +3,8 @@
*[~#]
.cache
.dir-locals.el
.tox
.eggs
.vimrc
__pycache__
build
dist
4 changes: 2 additions & 2 deletions .travis.yml
Expand Up @@ -9,12 +9,12 @@ python:
- "3.7"

install:
- pip install coveralls tox-travis -r requirements.txt
- pip install coveralls -r requirements.txt

script:
- flake8
- black --check ./
- tox
- coverage run --source full_yaml_metadata -m setup test

after_success:
- coveralls
Expand Down
2 changes: 1 addition & 1 deletion full_yaml_metadata.py
Expand Up @@ -24,7 +24,7 @@ class FullYamlMetadataPreprocessor(markdown.preprocessors.Preprocessor):
def run(self, lines: list) -> list:
meta_lines, lines = self.split_by_meta_and_content(lines)

self.md.Meta = yaml.load("\n".join(meta_lines))
self.md.Meta = yaml.load("\n".join(meta_lines), Loader=yaml.FullLoader)
return lines

def split_by_meta_and_content(self, lines: list) -> typing.Tuple[list]:
Expand Down
19 changes: 9 additions & 10 deletions requirements.txt
@@ -1,25 +1,24 @@
appdirs==1.4.3
atomicwrites==1.3.0
attrs==19.1.0
black==18.9b0
black==19.3b0
Click==7.0
entrypoints==0.3
flake8==3.7.7
flake8-debugger==3.1.0
flake8-isort==2.6.0
flake8-isort==2.7.0
flake8-print==3.1.0
flake8-quotes==1.0.0
isort==4.3.10
Markdown==3.0.1
isort==4.3.16
Markdown==3.1
mccabe==0.6.1
more-itertools==6.0.0
more-itertools==7.0.0
pluggy==0.9.0
py==1.7.0
py==1.8.0
pycodestyle==2.5.0
pyflakes==2.1.1
Pygments==2.2.0
pytest==4.3.0
PyYAML==3.13
pytest==4.4.0
PyYAML==5.1
six==1.12.0
testfixtures==6.4.3
testfixtures==6.6.2
toml==0.10.0
2 changes: 2 additions & 0 deletions setup.cfg
@@ -0,0 +1,2 @@
[aliases]
test=pytest
5 changes: 3 additions & 2 deletions setup.py
Expand Up @@ -12,15 +12,16 @@ def read(fname):
author="Nikita Sivakov",
author_email="sivakov512@gmail.com",
description="YAML metadata extension for Python-Markdown",
install_requires=["Markdown==3.0.1", "PyYAML>=3.13"],
install_requires=["Markdown~=3.0", "PyYAML~=5.0"],
keywords="markdown yaml meta metadata",
license="MIT",
long_description=read("README.md"),
long_description_content_type="text/markdown",
name="markdown-full-yaml-metadata",
py_modules=["full_yaml_metadata"],
python_requires=">=3.6",
setup_requires=["setuptools-markdown"],
setup_requires=["pytest-runner"],
tests_require=["pytest"],
version="1.0.0",
url="https://github.com/sivakov512/python-markdown-full-yaml-metadata",
)
8 changes: 0 additions & 8 deletions tox.ini

This file was deleted.

0 comments on commit e7cb87f

Please sign in to comment.