Skip to content

Commit 4c7c8cd

Browse files
committed
Removed 'alternate' structures as per specification change Sept 2015
1 parent a4a3ec4 commit 4c7c8cd

File tree

125 files changed

+247
-298
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

125 files changed

+247
-298
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
language: node_js
22
node_js:
3+
- "4.0"
34
- "0.12"
45
- "0.11"
56
after_success:

lib/index.js

Lines changed: 5 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
microformat-node - v1.1.0
3-
Built: 2015-09-14 03:09 -
2+
microformat-node - v1.2.0
3+
Built: 2015-09-25 02:09 -
44
Copyright (c) 2015 Glenn Jones
55
Licensed MIT
66
*/
@@ -11,8 +11,8 @@ var cheerio = require('cheerio'),
1111
Promise = require('bluebird');
1212

1313
var Modules = (function (modules) {
14-
modules.version = '1.1.0';
15-
modules.livingStandard = '2015-09-09T14:47:13Z';
14+
modules.version = '1.2.0';
15+
modules.livingStandard = '2015-09-25T12:26:04Z';
1616

1717
/**
1818
* constructor
@@ -97,9 +97,6 @@ var Modules = (function (modules) {
9797
rels = this.findRels(this.rootNode);
9898
out.rels = rels.rels;
9999
out['rel-urls'] = rels['rel-urls'];
100-
if(rels.alternate){
101-
out.alternates = rels.alternate;
102-
}
103100
}
104101

105102
}
@@ -2093,29 +2090,7 @@ var Modules = (function (modules) {
20932090
if(url && out['rel-urls'][url] === undefined){
20942091
out['rel-urls'][url] = relUrl;
20952092
}
2096-
2097-
if(relList.toLowerCase().indexOf('alternate') > -1){
2098-
// if its an alternate add
2099-
var obj = this.getRelProperties(arr[x]);
2100-
if(url){
2101-
obj.url = url;
2102-
}
2103-
2104-
if(items.length > 1){
2105-
if(modules.domUtils.hasAttribute(arr[x], 'rel')){
2106-
var clonedRelList = relList;
2107-
obj.rel = modules.utils.trim( clonedRelList.toLowerCase().replace('alternate','') );
2108-
}
2109-
}
2110-
// create the key
2111-
if(!out.alternate) {
2112-
out.alternate = [];
2113-
}
2114-
out.alternate.push( obj );
2115-
}
2116-
21172093

2118-
21192094

21202095
}
21212096
x++;
@@ -3736,7 +3711,7 @@ b,d){return g(y(h(a,d),h(b,d),d,!0),d)},normalize:function(a,b){"string"===typeo
37363711
'tfoot', 'th', 'thead', 'tr', 'td', 'ul', 'ol', 'dl', 'details'],
37373712

37383713
// tags which have code metadata
3739-
excludeTags: ['noframe', 'noscript', 'script', 'style', 'frames', 'frameset'],
3714+
excludeTags: ['noframe', 'noscript', 'template', 'script', 'style', 'frames', 'frameset'],
37403715

37413716

37423717
/**

lib/version.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
modules.version = '1.1.0';
1+
modules.version = '1.2.0';

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"author": "Glenn Jones",
33
"name": "microformat-node",
44
"description": "A microformat parser for node.js",
5-
"version": "1.1.0",
5+
"version": "1.2.0",
66
"license": "MIT",
77
"keywords": [
88
"parser",

static/javascript/data.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/interface-get-test.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,7 @@ var options = {
4040
'text': 'French mobile homepage',
4141
'rels': ['alternate', 'home']
4242
}
43-
},
44-
'alternates': [{
45-
'media': 'handheld',
46-
'hreflang': 'fr',
47-
'text': 'French mobile homepage',
48-
'url': 'http://example.com/fr',
49-
'rel': 'home'
50-
}]
43+
}
5144
};
5245
html = '<div class="h-card"><a class="p-name u-url" rel="bookmark" href="http://glennjones.net">Glenn Jones</a></div><a rel="alternate home" href="http://example.com/fr" media="handheld" hreflang="fr">French mobile homepage</a>';
5346

test/mf-mixed-h-card-mixedpropertries.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
2-
Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.23
2+
Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24
33
Mocha integration test from: microformats-mixed/h-card/mixedpropertries
4-
The test was built on Wed Sep 09 2015 16:39:33 GMT+0100 (BST)
4+
The test was built on Fri Sep 25 2015 14:17:16 GMT+0100 (BST)
55
*/
66

77
var chai = require('chai'),

test/mf-mixed-h-card-tworoots.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
2-
Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.23
2+
Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24
33
Mocha integration test from: microformats-mixed/h-card/tworoots
4-
The test was built on Wed Sep 09 2015 16:39:33 GMT+0100 (BST)
4+
The test was built on Fri Sep 25 2015 14:17:16 GMT+0100 (BST)
55
*/
66

77
var chai = require('chai'),

test/mf-mixed-h-entry-mixedroots.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/mf-mixed-h-resume-mixedroots.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
2-
Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.23
2+
Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24
33
Mocha integration test from: microformats-mixed/h-resume/mixedroots
4-
The test was built on Wed Sep 09 2015 16:39:33 GMT+0100 (BST)
4+
The test was built on Fri Sep 25 2015 14:17:16 GMT+0100 (BST)
55
*/
66

77
var chai = require('chai'),

0 commit comments

Comments
 (0)