Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Improvements

  • Loading branch information...
commit 86d9088e72f9c2eb5e2ae810e84c1d68d4be647d 1 parent 8f513be
@skid authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 extractor.js
View
5 extractor.js
@@ -247,7 +247,10 @@ function analyze(subtree, parent, root, depth) {
}
// Qualifies as a title node
- if( (root.titleWords) && (root.titleWords - node.words <= titleThreshold) && (root.titleWords - node.words >= 0) && (root.titleData.indexOf(data.toLowerCase()) !== -1) ){
+ if( (root.titleWords) &&
+ (root.titleWords - node.words <= titleThreshold) &&
+ (root.titleWords - node.data.split(reg_title).length >= 0) &&
+ (root.titleData.indexOf(data.toLowerCase()) !== -1) ){
// There is a title element in the head containing the exact words as this node (plus maybe a few more).
root.heading = node.data.toLowerCase();
root.headingNode = parent;
Please sign in to comment.
Something went wrong with that request. Please try again.