Skip to content
This repository has been archived by the owner on Jun 7, 2024. It is now read-only.

Commit

Permalink
Merge branch 'develop' into gh-pages
Browse files Browse the repository at this point in the history
* develop:
  v3.2.131
  Fix(release): give origin to gh-pages
  v3.2.130
  Fix(release): pull gh-pages before merge
  Fix(w3c/style): assure viewport and chaset are first (closes speced#791)
  Fix(save-html): assure viewport and chaset are first (closes speced#791)
  • Loading branch information
marcoscaceres committed May 27, 2016
2 parents 63dd524 + aba179b commit 1bb19d8
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 14 deletions.
2 changes: 1 addition & 1 deletion builds/respec-w3c-common.build.js.map

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions builds/respec-w3c-common.js

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions js/ui/save-html.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,22 @@ define(
$("#toc-nav", rootEl).remove() ;
$("body", rootEl).removeClass('toc-sidebar');
utils.removeReSpec(rootEl);

// Move meta viewport, as it controls the rendering on mobile
var head = rootEl.querySelector("head");
var metaViewport = rootEl.querySelector("meta[name='viewport']");
if(metaViewport){
head.insertBefore(metaViewport, head.firstChild);
}

// Move charset to top, because it needs to be in the first 512 bytes
var metaCharset = rootEl.querySelector("meta[charset=utf-8], meta[content*='charset=utf-8']");
if(!metaCharset){
pubsubhub.pub("warn", "Document lacks a 'meta charset' declaration. Exporting as utf-8.");
metaCharset = doc.createElement("meta");
metaCharset.setAttribute("charset", "utf-8");
}
head.insertBefore(metaCharset, head.firstChild);
};

// Clean up markup to overcome bugs in beautifier
Expand Down
7 changes: 6 additions & 1 deletion js/w3c/style.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ define(
doc.body.appendChild(script);
}

// Make a best effort to attach meta viewport at the top of the head.
// Other plugins might subsequently push it down, but at least we start
// at the right place. When ReSpec exports the HTML, it again moves the
// meta viewport to the top of the head - so to make sure it's the first
// thing the browser sees. See js/ui/save-html.js.
function attachMetaViewport(doc){
var meta = doc.createElement("meta");
meta.name = "viewport";
Expand All @@ -27,7 +32,7 @@ define(
"shrink-to-fit": "no",
};
meta.content = utils.toKeyValuePairs(contentProps).replace(/\"/g, "")
doc.head.appendChild(meta);
doc.head.insertBefore(meta, doc.head.firstChild);
}

function selectStyleVersion(styleVersion){
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "respec",
"version": "3.2.129",
"version": "3.2.131",
"license": "W3C",
"description": "Specification Edition Support Tool.",
"engines": {
Expand Down
1 change: 1 addition & 0 deletions tools/release.js
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ async.task(function * () {
yield git(`commit -am v${version}`);
// 5. Merge to gh-pages (git checkout gh-pages; git merge develop)
yield git(`checkout gh-pages`);
yield git(`pull origin gh-pages`);
yield git(`merge develop`);
yield git(`checkout develop`);
// 6. Tag the release (git tag v3.x.y)
Expand Down

0 comments on commit 1bb19d8

Please sign in to comment.