Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from braydonf/dirs
Fix replacing links in a directory.
- Loading branch information
Showing
3 changed files
with
3 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
module.exports = function FixLinks( data , callback) { | ||
var regex = / href=\"(\w+)\.md\"/mig; | ||
var regex = / href=\"([A-Za-z0-9_\/]+)\.md\"/mig; | ||
data.content = data.content.replace( regex , ' href="$1.html"'); | ||
callback( null , data ); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
var example = '<p>You can also instantiate an Address from a String, <a href="publickey.md">PublicKey</a>, or <a href="hierarchical.html">HDPublicKey</a>, in case you are not the owner of the private key.</p>'; | ||
var example = '<p>You can also instantiate an Address from a String, <a href="publickey.md">PublicKey</a>, or <a href="hierarchical.html">HDPublicKey</a>, in case you are not the owner of the private key.</p><ul><li><ul><li><a href="services/address.md">Services</a></li></ul></li></ul>'; | ||
|
||
module.exports = example; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.