Skip to content

Commit

Permalink
rename to plural, hasDelimiters
Browse files Browse the repository at this point in the history
  • Loading branch information
arve0 committed May 20, 2018
1 parent 2f879aa commit 1e337d4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
18 changes: 9 additions & 9 deletions patterns.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ module.exports = options => ([
{
shift: 0,
block: true,
info: utils.hasDelimiter('end', options)
info: utils.hasDelimiters('end', options)
}
],
transform: (tokens, i) => {
Expand Down Expand Up @@ -48,7 +48,7 @@ module.exports = options => ([
}, {
shift: 0,
type: 'text',
content: utils.hasDelimiter('start', options)
content: utils.hasDelimiters('start', options)
}
]
}
Expand Down Expand Up @@ -85,7 +85,7 @@ module.exports = options => ([
}, {
shift: 2,
type: 'inline',
content: utils.hasDelimiter('only', options)
content: utils.hasDelimiters('only', options)
}
],
transform: (tokens, i) => {
Expand Down Expand Up @@ -113,7 +113,7 @@ module.exports = options => ([
}, {
shift: 0,
type: 'text',
content: utils.hasDelimiter('start', options)
content: utils.hasDelimiters('start', options)
}
]
}
Expand Down Expand Up @@ -145,7 +145,7 @@ module.exports = options => ([
type: 'softbreak'
}, {
position: -1,
content: utils.hasDelimiter('only', options)
content: utils.hasDelimiters('only', options)
}
]
}
Expand Down Expand Up @@ -184,7 +184,7 @@ module.exports = options => ([
}, {
shift: 2,
type: 'inline',
content: utils.hasDelimiter('only', options),
content: utils.hasDelimiters('only', options),
children: (arr) => arr.length === 1
}, {
shift: 3,
Expand Down Expand Up @@ -214,7 +214,7 @@ module.exports = options => ([
children: [
{
position: -1,
content: utils.hasDelimiter('end', options)
content: utils.hasDelimiters('end', options)
}
]
}
Expand Down Expand Up @@ -245,7 +245,7 @@ module.exports = options => ([
}, {
position: -1,
type: 'text',
content: utils.hasDelimiter('only', options)
content: utils.hasDelimiters('only', options)
}
]
}
Expand All @@ -272,7 +272,7 @@ module.exports = options => ([
children: [
{
position: -1,
content: utils.hasDelimiter('end', options),
content: utils.hasDelimiters('end', options),
type: (t) => t !== 'code_inline'
}
]
Expand Down
2 changes: 1 addition & 1 deletion utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ exports.addAttrs = function (attrs, token) {
* @param {string} where to expect {} curly. start, middle, end or only.
* @return {function(string)} Function which testes if string has curly.
*/
exports.hasDelimiter = function (where, options) {
exports.hasDelimiters = function (where, options) {

if (!where) {
throw new Error('Parameter `where` not passed. Should be "start", "middle", "end" or "only".');
Expand Down

0 comments on commit 1e337d4

Please sign in to comment.