mirror of
https://github.com/loot/loot.github.io.git
synced 2026-07-27 14:13:30 -07:00
Update js-yaml to 4.1.0
This fixes an issue resolving aliases inside merge keys, but also changes the formatting to quote less than the input YAML does when dumping YAML.
This commit is contained in:
@@ -18,6 +18,6 @@ permalink: /convert-settings/
|
||||
|
||||
<p>Note that the download link that appears above after converting YAML does not work in Internet Explorer or Edge. Users of those browsers will need to copy the content of the TOML text box into a <code>settings.toml</code> file they create themselves, or use a different browser</code>.</p>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-yaml/3.4.3/js-yaml.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-yaml/4.1.0/js-yaml.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/tomlify-j0.4@3.0.0/tomlify.min.js"></script>
|
||||
<script src="/js/convert.js"></script>
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ function upgradeOldYaml(yaml) {
|
||||
|
||||
function yamlToToml(evt) {
|
||||
try {
|
||||
const settings = upgradeOldYaml(jsyaml.safeLoad(evt.target.value));
|
||||
const settings = upgradeOldYaml(jsyaml.load(evt.target.value));
|
||||
|
||||
const options = {
|
||||
space: 2,
|
||||
|
||||
+2
-2
@@ -34,7 +34,7 @@ function isRegexEntry(name) {
|
||||
}
|
||||
|
||||
function readMasterlist(response) {
|
||||
var masterlist = jsyaml.safeLoad(response.data);
|
||||
var masterlist = jsyaml.load(response.data);
|
||||
document.getElementById('progress').classList.add('hidden');
|
||||
|
||||
/* Do search here. */
|
||||
@@ -53,7 +53,7 @@ function readMasterlist(response) {
|
||||
console.log("Match: " + JSON.stringify(masterlist["plugins"][index]));
|
||||
var code = document.createElement('code');
|
||||
code.className = 'loot-search-result';
|
||||
code.textContent = ' - ' + jsyaml.safeDump(masterlist["plugins"][index]).replace(new RegExp('\n', 'g'), '\n ').trim();
|
||||
code.textContent = ' - ' + jsyaml.dump(masterlist["plugins"][index]).replace(new RegExp('\n', 'g'), '\n ').trim();
|
||||
resultsDiv.appendChild(code);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -24,6 +24,6 @@ permalink: /search/
|
||||
<div id="progress" class="mdl-spinner mdl-js-spinner mdl-spinner--single-color is-active hidden"></div>
|
||||
<div id="results" class="mdl-shadow--2dp"></div>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-yaml/3.4.3/js-yaml.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-yaml/4.1.0/js-yaml.min.js"></script>
|
||||
<script src="https://unpkg.com/github-api@2.3.0/dist/GitHub.bundle.min.js"></script>
|
||||
<script src="/js/search.js"></script>
|
||||
|
||||
Reference in New Issue
Block a user