| 1 |
Description: Don't use minified JavaScript without source |
| 2 |
|
| 3 |
This partly reverts https://github.com/dask/dask/pull/9306 |
| 4 |
as we don't have the package they switched to (and given that it's |
| 5 |
semi-abandoned, may not want to). |
| 6 |
|
| 7 |
Author: Rebecca N. Palmer <[email protected]> |
| 8 |
Forwarded: not-needed |
| 9 |
|
| 10 |
--- a/docs/source/_static/config_converter.js |
| 11 |
+++ b/docs/source/_static/config_converter.js |
| 12 |
@@ -53,7 +53,7 @@ window.addEventListener('load', (event) |
| 13 |
* @return {object} The parsed data |
| 14 |
*/ |
| 15 |
function parseYAML(raw) { |
| 16 |
- return YAML.parse(raw) |
| 17 |
+ return jsyaml.load(raw) |
| 18 |
} |
| 19 |
|
| 20 |
/** |
| 21 |
@@ -151,7 +151,7 @@ function parseCode(raw) { |
| 22 |
* @return {str} YAML configuration |
| 23 |
*/ |
| 24 |
function dumpYAML(config) { |
| 25 |
- return YAML.stringify(config, 10, 2) |
| 26 |
+ return jsyaml.dump(config) |
| 27 |
} |
| 28 |
|
| 29 |
/** |
| 30 |
--- a/docs/source/_templates/layout.html |
| 31 |
+++ b/docs/source/_templates/layout.html |
| 32 |
@@ -1,3 +1,3 @@ |
| 33 |
{% extends "!layout.html" %} |
| 34 |
{% set css_files = css_files + ["_static/style.css"] %} |
| 35 |
-{% set script_files = script_files + ["_static/yaml.min.js", "_static/config_converter.js"] %} |
| 36 |
+{% set script_files = script_files + ["_static/js-yaml.min.js", "_static/config_converter.js"] %} |