Skip to content

Commit

Permalink
fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
siddharthvp committed Mar 29, 2021
1 parent fb02ad2 commit 28f1a1a
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,21 +79,21 @@ export default class Banana {
* Register a plugin for the library's message parser
* Example:
* <pre>
* banana.registerParserPlugin('sysop', nodes => {
* return mw.config.get('wgUserGroups').includes('sysop') ?
* nodes[1] : nodes[2]
* }
* banana.registerParserPlugin('sysop', nodes => {
* return mw.config.get('wgUserGroups').includes('sysop') ?
* nodes[1] : nodes[2]
* }
* </pre>
* This allows messages to know if the user is a sysop. Usage:
* <pre>
* banana.i18n('this is a message {{sysop:|Message for sysops|Message for non-sysops}}')
* banana.i18n('this is a message {{sysop:|Message for sysops|Message for non-sysops}}')
* </pre>
* See emitter.js for built-in parser operations.
* @param {string} name - the name of the parser hook
* @param {Function} plugin - the plugin function. It receives nodes as argument -
* a mixed array corresponding to the pipe-separated objects in the operation.
*/
registerParserPlugin(name, plugin) {
BananaEmitter.prototype[name] = plugin;
registerParserPlugin (name, plugin) {
BananaEmitter.prototype[name] = plugin
}
}
}

0 comments on commit 28f1a1a

Please sign in to comment.