Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #63 from Sannis/fix-events-names

Fix item name/prefix for events of nested sections/namespaces/classes
  • Loading branch information...
commit 87a0ce8c3a087abf348738af8ff2e379ddcd7465 2 parents 570997c + 63f4d09
@puzrin puzrin authored
Showing with 17 additions and 2 deletions.
  1. +2 −2 lib/ndoc.js
  2. +15 −0 tests/features/issue_63.js
View
4 lib/ndoc.js
@@ -177,14 +177,14 @@ function build_tree(nodes, options) {
// cleanup nodes, reassign right ids after we resolved
// to which sections every element belongs
_.each(nodes, function (node, id) {
- var idx = node.id.indexOf('@'); // get position of @event start
-
delete nodes[id];
// compose new id
node.id = id.replace(/^[^.]*\./, '');
// First check for event, because event name can contain '.' and '#'
+ var idx = node.id.indexOf('@'); // get position of @event start
+
// Otherwise get property/method delimiter position
if (idx === -1) {
idx = Math.max(node.id.lastIndexOf('.'), node.id.lastIndexOf('#'));
View
15 tests/features/issue_63.js
@@ -0,0 +1,15 @@
+/**
+ * == Issue62 ==
+ **/
+
+/** section: Issue62
+ * class PullRequest
+ *
+ * This is a pull request that fixed "section > class > event" name parsing
+ **/
+
+/**
+ * PullRequest@event()
+ *
+ * Event example
+ **/
Please sign in to comment.
Something went wrong with that request. Please try again.