Skip to content

Commit 9982f98

Browse files
authored
chore: fix test failures (#3)
1 parent 3e6c020 commit 9982f98

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

.github/workflows/publish.yml

+2
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,7 @@ jobs:
1515
with:
1616
node-version: 18.x
1717
cache: 'npm'
18+
- name: Installing dependencies
19+
run: npm ci
1820
- name: Publish
1921
run: ./publish.sh ${GITHUB_REF#refs/*/}

package.json

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
"coverage": "nyc report --reporter=text-lcov | coveralls",
1919
"lint": "eslint .",
2020
"preversion": "mocha && npm run browser && git add markdown-it-attrs.browser.js",
21-
"postpublish": "git push && git push --tags",
2221
"test": "npm run lint && nyc mocha"
2322
},
2423
"homepage": "https://github.com/arve0/markdown-it-attrs",

test.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -409,9 +409,9 @@ function describeTestsWithOptions(options, postText) {
409409
});
410410

411411
it('should not support <p>', () => {
412-
md = Md().use(attrs, Object.assign({ allowedAttributes: [/^(class|attr)$/] }, Object.assign({}, options, { disableParagraphBlock: true })));
413-
src = '{"foo": false}\n## test {.test}';
414-
expected = '<p>{&quot;foo&quot;: false}</p>\n<h2 class="test">test</h2>\n';
412+
md = Md().use(attrs, Object.assign({ allowedAttributes: [] }, Object.assign({}, options, { disableParagraphBlock: true })));
413+
src = replaceDelimiters('{"foo": false}\n## test {.test}', options);
414+
expected = replaceDelimiters('<p>{&quot;foo&quot;: false}</p>\n<h2 class="test">test</h2>\n', options);
415415
const rendered = md.render(src);
416416
assert.equal(rendered, expected);
417417
});

0 commit comments

Comments
 (0)