Skip to content
This repository has been archived by the owner on Sep 7, 2020. It is now read-only.

Commit

Permalink
Changed: update to remark-autolink-headings@^4.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
MoOx committed Aug 22, 2016
1 parent 7e275b7 commit bd5a898
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# HEAD

- Changed: update to ``remark-autolink-headings@^4.0.0``.
This might fix issue with missing links for headings.
- Changed: ``phenomic/lib/content-loader`` reference is deprecated in favor of
``import { phenomicLoader } from "phenomic"``.
You can use ``phenomicLoader`` variable in webpack configuration to reference
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"react-router-scroll": "^0.3.1",
"redbox-react": "^1.2.2",
"remark": "^5.0.0",
"remark-autolink-headings": "^3.0.0",
"remark-autolink-headings": "^4.0.0",
"remark-highlight.js": "^4.0.0",
"remark-html": "^5.0.0",
"remark-slug": "^4.1.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ test("should add raw property from content", (t) => {
},
}),
{
body: `<h1 id="raw"><a href="#raw"></a>raw</h1>\n`,
body:
"<h1 id=\"raw\"><a href=\"#raw\" class=\"phenomic-HeadingAnchor\">#" +
"</a>raw</h1>\n",
}
)
})
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,13 @@ function mdify(text) {

// https://github.com/ben-eb/remark-autolink-headings
.use(autoLinkHeadings, {
attributes: {
class: "phenomic-HeadingAnchor",
content: {
type: "text",
value: "#",
},
linkProperties: {
className: "phenomic-HeadingAnchor",
},
template: "#",
})

// https://github.com/wooorm/remark-html
Expand All @@ -42,4 +45,3 @@ export default (
body: mdify(result.body),
}
}

0 comments on commit bd5a898

Please sign in to comment.