Skip to content

Commit dd51f62

Browse files
authored
‼️ Remove (p) => § replacement in typographer (#281)
`(p)` is no longer replaced with § by typographer (conflicts with ℗) Implements upstream: markdown-it/markdown-it@f523514
1 parent d5b3874 commit dd51f62

File tree

3 files changed

+7
-17
lines changed

3 files changed

+7
-17
lines changed

markdown_it/port.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
- package: markdown-it/markdown-it
2-
version: 12.3.2
3-
commit: d72c68b520cedacae7878caa92bf7fe32e3e0e6f
4-
date: Jan 8, 2022
2+
version: 13.0.1
3+
commit: e843acc9edad115cbf8cf85e676443f01658be08
4+
date: May 3, 2022
55
notes:
66
- Rename variables that use python built-in names, e.g.
77
- `max` -> `maximum`

markdown_it/rules_core/replacements.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
* ``(c)``, ``(C)`` → ©
44
* ``(tm)``, ``(TM)`` → ™
55
* ``(r)``, ``(R)`` → ®
6-
* ``(p)``, ``(P)`` → §
76
* ``+-`` → ±
87
* ``...`` → …
98
* ``?....`` → ?..
@@ -26,15 +25,15 @@
2625

2726
# TODO:
2827
# - fractionals 1/2, 1/4, 3/4 -> ½, ¼, ¾
29-
# - miltiplication 2 x 4 -> 2 × 4
28+
# - multiplication 2 x 4 -> 2 × 4
3029

3130
RARE_RE = re.compile(r"\+-|\.\.|\?\?\?\?|!!!!|,,|--")
3231

3332
# Workaround for phantomjs - need regex without /g flag,
3433
# or root check will fail every second time
35-
# SCOPED_ABBR_TEST_RE = r"\((c|tm|r|p)\)"
34+
# SCOPED_ABBR_TEST_RE = r"\((c|tm|r)\)"
3635

37-
SCOPED_ABBR_RE = re.compile(r"\((c|tm|r|p)\)", flags=re.IGNORECASE)
36+
SCOPED_ABBR_RE = re.compile(r"\((c|tm|r)\)", flags=re.IGNORECASE)
3837

3938
PLUS_MINUS_RE = re.compile(r"\+-")
4039

@@ -53,7 +52,7 @@
5352
EN_DASH_INDENT_RE = re.compile(r"(^|[^-\s])--(?=[^-\s]|$)", flags=re.MULTILINE)
5453

5554

56-
SCOPED_ABBR = {"c": "©", "r": "®", "p": "§", "tm": "™"}
55+
SCOPED_ABBR = {"c": "©", "r": "®", "tm": "™"}
5756

5857

5958
def replaceFn(match: re.Match[str]) -> str:

tests/test_port/fixtures/typographer.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,6 @@ trademark
4141
<p>™ ™</p>
4242
.
4343

44-
45-
paragraph
46-
.
47-
(p) (P)
48-
.
49-
<p>§ §</p>
50-
.
51-
52-
5344
plus-minus
5445
.
5546
+-5

0 commit comments

Comments
 (0)