Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(deps-dev): bump eslint-config-peopledoc from 2.0.2 to 3.0.2 #146

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion assets/styledown.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
}
})

function addCodeToggleButton (parent, code) {
function addCodeToggleButton(parent, code) {
// hide the <pre>
code.classList.add('sg-hidden')

Expand Down
6 changes: 3 additions & 3 deletions bin/styledown.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ if (args.help || args._.length === 0) {
'Support files:',
` ${cmd} --conf > config.md`,
` ${cmd} --css > styledown.css`,
` ${cmd} --js > styledown.js`,
` ${cmd} --js > styledown.js`
].join('\n'))
process.exit()
}
Expand All @@ -71,7 +71,7 @@ read(args._, function (err, res) {
print(html, ms)
})

function print (html, ms) {
function print(html, ms) {
if (args.output) {
writeFileSync(args.output, html)

Expand All @@ -85,7 +85,7 @@ function print (html, ms) {
}
}

function measure (fn) {
function measure(fn) {
let d = new Date()
fn()
return new Date() - d
Expand Down
8 changes: 4 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class Styledown {
* => "<div><h3>Your document</h3>..."
*/

toBareHTML () {
toBareHTML() {
return this.raws.reduce((html, raw) => {
return `${html}${raw.html}`
}, '')
Expand Down Expand Up @@ -273,13 +273,13 @@ Styledown.version = version
*/

Styledown.defaults = {
conf () {
conf() {
return default_conf
},
js () {
js() {
return readFileSync(`${__dirname }/assets/styledown.js`)
},
css () {
css() {
return readFileSync(`${__dirname }/assets/styledown.css`)
}
}
Expand Down
6 changes: 3 additions & 3 deletions lib/filters.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const extend = require('util')._extend
const {
parseCodeText,
parseTags,
htmlize,
htmlize
} = require('./utils')
const Cheerio = require('cheerio')
const Hljs = require('highlight.js')
Expand All @@ -25,7 +25,7 @@ exports.addClasses = function ($, pre) {
exports.sectionize = function ($, tag, pre, options) {
options = extend({
'class': '',
'until': 'h1, h2, h3, section',
'until': 'h1, h2, h3, section'
}, options)

$(tag).each(function () {
Expand Down Expand Up @@ -115,7 +115,7 @@ exports.processConfig = function (src, options) {

exports.isolateTextBlocks = function ($, pre) {

$(`.${pre('block')}`).each(function() {
$(`.${pre('block')}`).each(function () {
let $this = $(this)
// Check if there's an example block.
// $('.sg-example', this).length doesn't work.
Expand Down
4 changes: 2 additions & 2 deletions lib/mdconf.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ let md = require('marked')
* @api public
*/

module.exports = function(str, options){
module.exports = function (str, options){
options = options || {}

options = {
Expand Down Expand Up @@ -109,6 +109,6 @@ let normalizers = {
return str.replace(/\s+/g, ' ').toLowerCase().trim()
},
camelcase(str) {
return str.toLowerCase().replace(/\s+([^\s])/g, function(_, char) { return char.toUpperCase() }).trim()
return str.toLowerCase().replace(/\s+([^\s])/g, function (_, char) { return char.toUpperCase() }).trim()
}
}
Loading