From 17db291b5cc842073471d881ef05ce9cbfaa0911 Mon Sep 17 00:00:00 2001 From: isaacs Date: Mon, 27 Feb 2012 11:37:26 -0800 Subject: [PATCH] 'Events' is a module, not an event named 's' --- doc/api/events.markdown | 2 ++ tools/doc/json.js | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) 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 + + 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;