Browse Source

Remove (p) => § replacement in typographer

close https://github.com/markdown-it/markdown-it/issues/763
pull/866/head
Alex Kocharin 3 years ago
parent
commit
f52351499b
  1. 1
      CHANGELOG.md
  2. 5
      lib/rules_core/replacements.js
  3. 8
      test/fixtures/markdown-it/typographer.txt

1
CHANGELOG.md

@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
insert themselves before it.
### Changed
- `(p)` is no longer replaced with § by typographer (conflicts with ℗), #763.
- `text_collapse` rule is renamed to `fragments_join`.
### Fixed

5
lib/rules_core/replacements.js

@ -19,13 +19,12 @@ var RARE_RE = /\+-|\.\.|\?\?\?\?|!!!!|,,|--/;
// Workaround for phantomjs - need regex without /g flag,
// or root check will fail every second time
var SCOPED_ABBR_TEST_RE = /\((c|tm|r|p)\)/i;
var SCOPED_ABBR_TEST_RE = /\((c|tm|r)\)/i;
var SCOPED_ABBR_RE = /\((c|tm|r|p)\)/ig;
var SCOPED_ABBR_RE = /\((c|tm|r)\)/ig;
var SCOPED_ABBR = {
c: '©',
r: '®',
p: '§',
tm: '™'
};

8
test/fixtures/markdown-it/typographer.txt

@ -29,14 +29,6 @@ trademark
.
paragraph
.
(p) (P)
.
<p>§ §</p>
.
plus-minus
.
+-5

Loading…
Cancel
Save