Skip to content

Commit

Permalink
refactor(subParsers): change name and directory of subparsers
Browse files Browse the repository at this point in the history
BREAKING CHANGE: makeHtml subparsers names changed, by prepending 'makehtml.' to them.
Example: 'anchors', subparser is now named 'makehtml.anchors'.

Event names were also changed to reflect this.
Example: 'anchors.before' is now named 'makehtml.anchors.before'.

**To migrate:**

If you have a listener extension, replace the old event name with the new one. Example:

Replace this

```js
showdown.extension('myext', function() {
  return [{
    type: 'listener',
    listeners: {
      'anchors.before': function (event, text, converter, options, globals) {
        //... some code
        return text;
      }
  }];
});
```

with this
```js
showdown.extension('myext', function() {
  return [{
    type: 'listener',
    listeners: {
      'makehtml.anchors.before': function (event, text, converter, options, globals) {
        //... some code
        return text;
      }
  }];
});
```
  • Loading branch information
tivie committed Dec 16, 2017
1 parent 6dbd396 commit 3db9200
Show file tree
Hide file tree
Showing 49 changed files with 1,352 additions and 1,351 deletions.
3 changes: 2 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ module.exports = function (grunt) {
'src/options.js',
'src/showdown.js',
'src/helpers.js',
'src/subParsers/makehtml/*.js',
'src/subParsers/makemd/*.js',
'src/converter.js',
'src/subParsers/*.js',
'src/loader.js'
],
dest: 'dist/<%= pkg.name %>.js'
Expand Down
Loading

0 comments on commit 3db9200

Please sign in to comment.