Benjamin-eecs's picture
release v1: 65 held-out tasks, 78 bootstrap records, r2e_local adapter, manifest ae94c40b (part 5)
0b7eb60 verified
Raw History Blame Contribute Delete
1.63 kB
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index a74d632..a2e06cd 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -16,6 +16,8 @@ jobs:
steps:
- uses: actions/checkout@v3
+ with:
+ submodules: true
- name: Set up PDM
uses: pdm-project/setup-pdm@v3
with:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1ea3ea5..4423f72 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,7 @@
- Fix a rendering bug when line breaks exist in a link text. [#126](https://github.com/frostming/marko/issue/126)
- Drop support of Python 3.6.
- Update the GFM spec to the latest master branch.
+- Fix a precedence issue of parsing strikethroughs in GFM.
## v1.2.2(2022-09-22)
diff --git a/marko/ext/gfm/elements.py b/marko/ext/gfm/elements.py
index f2b0886..fd1e881 100644
--- a/marko/ext/gfm/elements.py
+++ b/marko/ext/gfm/elements.py
@@ -34,9 +34,10 @@ class InlineHTML(inline.InlineHTML):
class Strikethrough(inline.InlineElement):
- pattern = re.compile(r"~~([^~]+)~~")
+ pattern = re.compile(r"(?<!~)(~|~~)([^~]+)\1(?!~)")
priority = 5
parse_children = True
+ parse_group = 2
class _MatchObj:
diff --git a/noxfile.py b/noxfile.py
index a5047e9..83a2d3a 100644
--- a/noxfile.py
+++ b/noxfile.py
@@ -5,7 +5,7 @@ import nox
os.environ.update(PDM_IGNORE_SAVED_PYTHON="1")
-@nox.session(python=["3.6", "3.8", "3.9", "3.10", "3.11"])
+@nox.session(python=["3.7", "3.8", "3.9", "3.10", "3.11"])
def tests(session):
session.run("pdm", "install", "-d", external=True)
session.run("pytest", "tests/")