Skip to content

Commit

Permalink
0.7.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Twipped committed Apr 3, 2015
1 parent 2faca08 commit d132cad
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
7 changes: 7 additions & 0 deletions History.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
0.7.1 / 2015-04-03
==================

Context parsing has been re-factored into an array of functions that are iterated over until a match is found. This array is exposed as `dox.contextPatternMatchers`, allowing for extension with new contexts without needing to edit the dox source.

* Fix: ES6 classes extended from sub-properties (such as Backbone.View) are now properly matched

0.7.0 / 2015-03-24
==================

Expand Down
18 changes: 18 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,24 @@ ctx:
string: 'User()' } }
```

### Extending Context Matching

Context matching in dox is done by performing pattern matching against the code following a
comment block. `dox.contextPatternMatchers` is an array of all pattern matching functions,
which dox will iterate over until one of them returns a result. If none return a result,
then the comment block does not receive a `ctx` value.

This array is exposed to allow for extension of unsupported context patterns by adding more
functions. Each function is passed the code following the comment block and (if detected)
the parent context if the block.

```js
dox.contextPatternMatchers.push(function (str, parentContext) {
// return a context object if found
// return false otherwise
});
```

### Ignore

Comments and their associated bodies of code may be flagged with "!" to be considered worth ignoring, these are typically things like file comments containing copyright etc, however you of course can output them in your templates if you want.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "dox",
"description": "Markdown / JSdoc documentation generator",
"version": "0.7.0",
"version": "0.7.1",
"author": "TJ Holowaychuk <tj@vision-media.ca>",
"contributors": [
"Jarvis Badgley <chiper@chipersoft.com>",
Expand Down

0 comments on commit d132cad

Please sign in to comment.