diff options
-rw-r--r-- | doc/api/events.markdown | 2 | ||||
-rw-r--r-- | tools/doc/json.js | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/doc/api/events.markdown b/doc/api/events.markdown index af64c62271f..b9000f2928b 100644 --- a/doc/api/events.markdown +++ b/doc/api/events.markdown @@ -1,5 +1,7 @@ # Events +<!--type=module--> + Many objects in Node emit events: a `net.Server` emits an event each time a peer connects to it, a `fs.readStream` emits an event when the file is opened. All objects which emit events are instances of `events.EventEmitter`. diff --git a/tools/doc/json.js b/tools/doc/json.js index f577f4d52e7..e4c5d76c461 100644 --- a/tools/doc/json.js +++ b/tools/doc/json.js @@ -487,7 +487,7 @@ function deepCopy_(src) { // these parse out the contents of an H# tag -var eventExpr = /^Event:?\s*['"]?([^"']+).*$/i; +var eventExpr = /^Event(?::|\s)+['"]?([^"']+).*$/i; var classExpr = /^Class:\s*([^ ]+).*?$/i; var propExpr = /^(?:property:?\s*)?[^\.]+\.([^ \.\(\)]+)\s*?$/i; var braceExpr = /^(?:property:?\s*)?[^\.\[]+(\[[^\]]+\])\s*?$/i; |