-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2d134db
commit f16a5e6
Showing
14 changed files
with
82 additions
and
81 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
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
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
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
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
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
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
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,17 +1,14 @@ | ||
var eachTextNode = require('./eachTextNode'); | ||
var cheerio = require('cheerio'); | ||
|
||
module.exports = function smallCaps (html, options) { | ||
|
||
html = eachTextNode(html, function(text, node){ | ||
html = eachTextNode(html, function(text){ | ||
|
||
text = text.split('fi').join('fi'); | ||
text = text.split('fl').join('fl'); | ||
|
||
return text; | ||
}); | ||
}, options); | ||
|
||
return html; | ||
} | ||
|
||
|
||
}; |
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
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
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
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,16 +1,15 @@ | ||
var eachTextNode = require('./eachTextNode'); | ||
var cheerio = require('cheerio'); | ||
|
||
module.exports = function smallCaps (html, options) { | ||
|
||
html = eachTextNode(html, function(text, node){ | ||
html = eachTextNode(html, function(text){ | ||
|
||
text = text.split(' × ').join(' × '); | ||
|
||
text = text.split(' / ').join(' / '); | ||
// replaces wide spaces with hair spaces | ||
text = text.split(' × ').join(' × '); | ||
text = text.split(' / ').join(' / '); | ||
|
||
return text; | ||
}); | ||
}, options); | ||
|
||
return html; | ||
} | ||
}; |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
var typeset = require('../src'); | ||
var assert = require('assert'); | ||
var fs = require('fs'); | ||
|
||
var html = fs.readFileSync(__dirname + '/index-src.html', 'utf-8'); | ||
|
||
|
||
console.log(typeset(html)); | ||
console.log(typeset(typeset(typeset(html)))); |
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