Skip to content
This repository has been archived by the owner on Nov 4, 2022. It is now read-only.

Commit

Permalink
Merge branch 'release/v3.1.63' into gh-pages
Browse files Browse the repository at this point in the history
Conflicts:
	builds/respec-w3c-common.js
  • Loading branch information
darobin committed Aug 29, 2013
2 parents 9294af2 + a1a7c20 commit e1634f2
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 9 deletions.
1 change: 1 addition & 0 deletions builds/respec-w3c-common-3.1.63.js

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion builds/respec-w3c-common.js

Large diffs are not rendered by default.

11 changes: 8 additions & 3 deletions js/core/data-include.js
Expand Up @@ -42,15 +42,20 @@ define(
$incs.each(function () {
var $el = $(this)
, uri = $el.attr("data-include")
, format = $el.attr("data-include-format") || "html";
, format = $el.attr("data-include-format") || "html"
, replace = !!$el.attr("data-include-replace")
, sync = !!$el.attr("data-include-sync")
;
$.ajax({
dataType: format
, url: uri
, success: function (data, status, xhr) {
, async: !sync
, success: function (data) {
if (data) {
var flist = $el.attr("data-oninclude");
if (flist) data = utils.runTransforms(data, flist, uri);
format === "text" ? $el.text(data) : $el.html(data);
if (replace) $el.replaceWith(format === "text" ? doc.createTextNode(data) : data);
else format === "text" ? $el.text(data) : $el.html(data);
}
finish($el);
}
Expand Down
5 changes: 3 additions & 2 deletions js/core/structure.js
Expand Up @@ -103,10 +103,11 @@ define(
if (!$ul) return;
var $sec = $("<section id='toc'/>").append("<h2 class='introductory'>" + i18n[conf.lang || "en"].toc + "</h2>")
.append($ul);
var $ref = $("#toc", doc);
var $ref = $("#toc", doc), replace = false;
if ($ref) replace = true;
if (!$ref.length) $ref = $("#sotd", doc);
if (!$ref.length) $ref = $("#abstract", doc);
$ref.after($sec);
replace ? $ref.replaceWith($sec) : $ref.after($sec);
}

// Update all anchors with empty content that reference a section ID
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "respec",
"version": "3.1.62",
"version": "3.1.63",
"description": "Specification Edition Support Tool.",
"main": "index.js",
"directories": {
Expand Down
4 changes: 2 additions & 2 deletions tests/spec/core/utils-spec.js
Expand Up @@ -91,15 +91,15 @@ describe("Core - Utils", function () {
// isoDate
it("should produce an ISO date", function () {
runs(function () {
expect(utils.isoDate("2013-06-25")).toMatch(/2013-06-25T/) ;
expect(utils.isoDate("2013-06-25")).toMatch(/2013-06-2[45]T/) ;
var d = new Date();
d.setFullYear(2013);
d.setMonth(5);
d.setDate(25);
d.setHours(0);
d.setMinutes(0);
d.setSeconds(0);
expect(utils.isoDate(d)).toMatch(/2013-06-25T/);
expect(utils.isoDate(d)).toMatch(/2013-06-2[45]T/);
});
});

Expand Down

0 comments on commit e1634f2

Please sign in to comment.