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

Commit

Permalink
v8.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoscaceres committed Feb 1, 2017
1 parent 7e98ef2 commit a9a97c0
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 17 deletions.
2 changes: 1 addition & 1 deletion builds/respec-w3c-common.build.js.map

Large diffs are not rendered by default.

27 changes: 13 additions & 14 deletions builds/respec-w3c-common.js

Large diffs are not rendered by default.

34 changes: 33 additions & 1 deletion builds/respec-worker.js
Original file line number Diff line number Diff line change
@@ -1 +1,33 @@
// ReSpec Worker v0
// ReSpec Worker v0.1.0
"use strict";
importScripts("https://www.w3.org/Tools/respec/respec-highlight.js");

hljs.configure({
tabReplace: " ", // 2 spaces
languages: [
"css",
"http",
"javascript",
"json",
"markdown",
"xml",
],
});

self.addEventListener("message", function(e) {
switch (e.data.action) {
case "highlight":
const code = e.data.code;
const langs = e.data.languages.length ? e.data.languages : undefined;
const result = self.hljs.highlightAuto(code, langs);
const data = Object.assign({}, e.data, result);
try {
self.postMessage(data);
} catch (err) {
console.error("Could not transform some code?", err);
// Post back the original unhighlighted code.
const fallbackData = Object.assign({}, e.data, { value: e.data.code });
self.postMessage(fallbackData);
}
}
});
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": "8.7.1",
"version": "8.8.0",
"license": "W3C",
"description": "A technical specification pre-processor.",
"engines": {
Expand Down

0 comments on commit a9a97c0

Please sign in to comment.