diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 73ee0a8..3644d12 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.8", "3.9", "3.10", "3.11"] + python-version: ["3.9", "3.10", "3.11"] steps: - uses: actions/checkout@v2 @@ -40,10 +40,10 @@ jobs: run: | poetry run pip install --upgrade pip poetry install - - name: Install supported pandoc 3.14 + - name: Install supported pandoc 3.2 run: | - wget https://github.com/jgm/pandoc/releases/download/3.1.4/pandoc-3.1.4-1-amd64.deb - sudo dpkg -i pandoc-3.1.4-1-amd64.deb + wget https://github.com/jgm/pandoc/releases/download/3.2.1/pandoc-3.2.1-1-amd64.deb + sudo dpkg -i pandoc-3.2.1-1-amd64.deb - name: Install unsupported pandoc 2.10 run: | wget https://github.com/jgm/pandoc/releases/download/2.10.1/pandoc-2.10.1-linux-amd64.tar.gz diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b4243a2..663570c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,7 +5,7 @@ ci: # See https://pre-commit.com/hooks.html for info on hooks repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.5.0 + rev: v4.6.0 hooks: - id: check-added-large-files - id: check-ast @@ -21,12 +21,12 @@ repos: - id: trailing-whitespace - repo: https://github.com/psf/black - rev: 23.12.1 + rev: 24.4.2 hooks: - id: black - repo: https://github.com/PyCQA/flake8 - rev: 6.1.0 + rev: 7.1.0 hooks: - id: flake8 args: [--max-line-length=88] @@ -37,7 +37,7 @@ repos: - id: isort - repo: https://github.com/asottile/pyupgrade - rev: v3.15.0 + rev: v3.16.0 hooks: - id: pyupgrade args: [--py38-plus] diff --git a/README.md b/README.md index 141d628..4cb5ecb 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Requirements This plugin requires: -* Python 3.8 or higher; and +* Python 3.9 or higher; and * Pandoc 2.11 or higher [[Pandoc installation instructions](https://pandoc.org/installing.html)]. By default, the plugin looks for a `pandoc` executable on your `PATH`. If you wish, [you may specify an alternative location for your `pandoc` executable](#customizing-the-path-for-the-pandoc-executable). diff --git a/pelican/plugins/pandoc_reader/__init__.py b/pelican/plugins/pandoc_reader/__init__.py index 124ec0b..8db335b 100644 --- a/pelican/plugins/pandoc_reader/__init__.py +++ b/pelican/plugins/pandoc_reader/__init__.py @@ -1,2 +1,3 @@ """Importing pandoc_reader package.""" + from .pandoc_reader import * # NOQA diff --git a/pelican/plugins/pandoc_reader/pandoc_reader.py b/pelican/plugins/pandoc_reader/pandoc_reader.py index 99f2070..4079977 100644 --- a/pelican/plugins/pandoc_reader/pandoc_reader.py +++ b/pelican/plugins/pandoc_reader/pandoc_reader.py @@ -1,4 +1,5 @@ """Reader that processes Pandoc Markdown and returns HTML5.""" + import json import math import os diff --git a/pelican/plugins/pandoc_reader/test/html/expected_html.py b/pelican/plugins/pandoc_reader/test/html/expected_html.py index 6120469..145bd36 100644 --- a/pelican/plugins/pandoc_reader/test/html/expected_html.py +++ b/pelican/plugins/pandoc_reader/test/html/expected_html.py @@ -11,15 +11,19 @@ "which is a relative newcomer to theoretical physics, but one that has " "captured the common imagination, judging by the popular explanations " "that abound on the Web " - '[1]–[3]' + '' + "[1], [2], [3]" ". And whether string theory is or is not science, Popper " "notwithstanding, is an issue that is still up for debate " '' - "[4]–[7].

" + "[4], [5], [6], [7]
.

" ), '

References

', - '
', + ( + '
' + ), '
', ( '
[1]
' diff --git a/pelican/plugins/pandoc_reader/test/test_invalid_args.py b/pelican/plugins/pandoc_reader/test/test_invalid_args.py index d899cf4..a003ff1 100644 --- a/pelican/plugins/pandoc_reader/test/test_invalid_args.py +++ b/pelican/plugins/pandoc_reader/test/test_invalid_args.py @@ -1,4 +1,5 @@ """Test using invalid arguments and extensions with the pandoc-reader plugin.""" + import os import unittest diff --git a/pelican/plugins/pandoc_reader/test/test_invalid_defaults_files.py b/pelican/plugins/pandoc_reader/test/test_invalid_defaults_files.py index 089afc7..6170a12 100644 --- a/pelican/plugins/pandoc_reader/test/test_invalid_defaults_files.py +++ b/pelican/plugins/pandoc_reader/test/test_invalid_defaults_files.py @@ -1,4 +1,5 @@ """Test using invalid defaults files with the pandoc-reader plugin.""" + import os import unittest diff --git a/pelican/plugins/pandoc_reader/test/test_invalid_metadata.py b/pelican/plugins/pandoc_reader/test/test_invalid_metadata.py index 0c6bfaf..a196a8f 100644 --- a/pelican/plugins/pandoc_reader/test/test_invalid_metadata.py +++ b/pelican/plugins/pandoc_reader/test/test_invalid_metadata.py @@ -1,4 +1,5 @@ """Test using invalid metadata with the pandoc-reader plugin.""" + import os import unittest diff --git a/pelican/plugins/pandoc_reader/test/test_invalid_multiple_defaults_files.py b/pelican/plugins/pandoc_reader/test/test_invalid_multiple_defaults_files.py index 4941b0e..9f7e673 100644 --- a/pelican/plugins/pandoc_reader/test/test_invalid_multiple_defaults_files.py +++ b/pelican/plugins/pandoc_reader/test/test_invalid_multiple_defaults_files.py @@ -1,4 +1,5 @@ """Test using multiple invalid default files with the pandoc-reader plugin.""" + import os import unittest diff --git a/pelican/plugins/pandoc_reader/test/test_pandoc_availability.py b/pelican/plugins/pandoc_reader/test/test_pandoc_availability.py index cdf929c..293b0a4 100644 --- a/pelican/plugins/pandoc_reader/test/test_pandoc_availability.py +++ b/pelican/plugins/pandoc_reader/test/test_pandoc_availability.py @@ -1,4 +1,5 @@ """Test if a supported version of the pandoc executable is available.""" + import os import shutil import unittest diff --git a/pelican/plugins/pandoc_reader/test/test_specific_outputs.py b/pelican/plugins/pandoc_reader/test/test_specific_outputs.py index ca59ce5..036367f 100644 --- a/pelican/plugins/pandoc_reader/test/test_specific_outputs.py +++ b/pelican/plugins/pandoc_reader/test/test_specific_outputs.py @@ -1,4 +1,5 @@ """Test reading time and summary output from the pandoc-reader plugin.""" + import os import unittest diff --git a/pelican/plugins/pandoc_reader/test/test_valid_arg_citations.py b/pelican/plugins/pandoc_reader/test/test_valid_arg_citations.py index abf630a..90b6a66 100644 --- a/pelican/plugins/pandoc_reader/test/test_valid_arg_citations.py +++ b/pelican/plugins/pandoc_reader/test/test_valid_arg_citations.py @@ -1,4 +1,5 @@ """Test using valid arguments and citations with the pandoc-reader plugin.""" + import os import unittest diff --git a/pelican/plugins/pandoc_reader/test/test_valid_args.py b/pelican/plugins/pandoc_reader/test/test_valid_args.py index c1a6ed0..23b113c 100644 --- a/pelican/plugins/pandoc_reader/test/test_valid_args.py +++ b/pelican/plugins/pandoc_reader/test/test_valid_args.py @@ -1,4 +1,5 @@ """Test using valid arguments and extensions with the pandoc-reader plugin.""" + import os import unittest diff --git a/pelican/plugins/pandoc_reader/test/test_valid_defaults_files.py b/pelican/plugins/pandoc_reader/test/test_valid_defaults_files.py index 156dcc0..38e6bee 100644 --- a/pelican/plugins/pandoc_reader/test/test_valid_defaults_files.py +++ b/pelican/plugins/pandoc_reader/test/test_valid_defaults_files.py @@ -1,4 +1,5 @@ """Test using valid default files with the pandoc-reader plugin.""" + import os import unittest diff --git a/pelican/plugins/pandoc_reader/test/test_valid_multiple_default_files.py b/pelican/plugins/pandoc_reader/test/test_valid_multiple_default_files.py index 84015ea..bfd561f 100644 --- a/pelican/plugins/pandoc_reader/test/test_valid_multiple_default_files.py +++ b/pelican/plugins/pandoc_reader/test/test_valid_multiple_default_files.py @@ -1,4 +1,5 @@ """Test using multiple valid defaults files with the pandoc-reader plugin.""" + import os import unittest diff --git a/pyproject.toml b/pyproject.toml index 945203a..99ba77e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,12 +28,13 @@ classifiers = [ "Issue Tracker" = "https://github.com/pelican-plugins/pandoc-reader/issues" [tool.poetry.dependencies] -python = ">=3.8.1,<4.0" +python = ">=3.9.0,<4.0" pelican = ">=4.5" markdown = {version = "<=3.3.4", optional = true} pyyaml = "^6.0.0" beautifulsoup4 = "^4.9.3" "ruamel.yaml" = "^0.17.32" +docutils = "^0.21.2" [tool.poetry.dev-dependencies] black = "^23"