From 939a340cab8de175752eaf857af2df732e5a9ad0 Mon Sep 17 00:00:00 2001
From: Morgan <3970018+morgan3d@users.noreply.github.com>
Date: Sun, 22 Dec 2024 07:16:28 -0800
Subject: [PATCH] archive
---
1.17/markdeep.js | 32 ++++++++++++++++++--------------
1.17/markdeep.min.js | 2 +-
1.17/slate.css | 7 ++++++-
latest/markdeep.js | 32 ++++++++++++++++++--------------
latest/markdeep.min.js | 2 +-
latest/slate.css | 7 ++++++-
6 files changed, 50 insertions(+), 32 deletions(-)
diff --git a/1.17/markdeep.js b/1.17/markdeep.js
index 3ec1a00..db2a2a8 100644
--- a/1.17/markdeep.js
+++ b/1.17/markdeep.js
@@ -2391,7 +2391,7 @@ function insertTableOfContents(s, protect, exposer) {
// Gather headers for table of contents (TOC). We
// accumulate a long and short TOC and then choose which
// to insert at the end.
- var fullTOC = '(Top)
\n';
+ var fullTOC = '(Top)
\n';
var shortTOC = '';
// names of parent sections
@@ -2443,10 +2443,10 @@ function insertTableOfContents(s, protect, exposer) {
// Only insert for the first three levels
if (level <= tocDepth) {
// Indent and append (the Array() call generates spaces)
- fullTOC += Array(level).join(' ') + '' + number + ' ' + text + '
\n';
+ fullTOC += Array(level).join(' ') + '' + number + ' ' + text + '
\n';
if (level === 1) {
- shortTOC += ' · ' + text + '';
+ shortTOC += ' · ' + text + '';
} else {
++numAboveLevel1;
}
@@ -2939,7 +2939,7 @@ function markdeepToHTML(str, elementMode) {
endNoteTable[symbolicName] = endNoteCount;
}
- return '' + endNoteTable[symbolicName] + '';
}
str = str.rp(/[ \t]*\[\^([^\]\n\t ]+)\](?!:)/g, endNote);
@@ -2963,7 +2963,7 @@ function markdeepToHTML(str, elementMode) {
for (var i = 0; i < symbolicNameList.length; ++i) {
// Strip spaces and # signs
var name = symbolicNameList[i].rp(/#| /g, '');
- s += entag('a', name, protect('href="#citation-' + name.toLowerCase() + '"'));
+ s += entag('a', name, protect('href="#citation-' + name.toLowerCase() + '" target="_self"'));
if (i < symbolicNameList.length - 1) { s += ', '; }
}
return s + ']';
@@ -3346,7 +3346,7 @@ function markdeepToHTML(str, elementMode) {
if (allHeaders) {
allHeaders.forEach(function (header) {
header = removeHTMLTags(header.ss(4, header.length - 5)).trim();
- var link = '';
+ var link = '';
var sectionExp = '(' + keyword('section') + '|' + keyword('subsection') + '|' + keyword('chapter') + ')';
var headerExp = '(\\b' + escapeRegExpCharacters(header) + ')';
@@ -3373,7 +3373,7 @@ function markdeepToHTML(str, elementMode) {
if (t) {
t.used = true;
- return '' + _type + ' ' + t.number + maybeShowLabel(_ref) + '';
+ return '' + _type + ' ' + t.number + maybeShowLabel(_ref) + '';
} else {
console.log("Reference to undefined '" + type + " [" + _ref + "]'");
return _type + ' ?';
@@ -3389,8 +3389,8 @@ function markdeepToHTML(str, elementMode) {
url = url.ss(0, url.length - 1);
extra = '.';
}
- // svn and perforce URLs are not hyperlinked. All others (http/https/ftp/mailto/tel, etc. are)
- return '' + url + '' + extra;
+ // svn, perforce, and quadplay URLs are not hyperlinked. All others (http/https/ftp/mailto/tel, etc. are)
+ return '' + url + '' + extra;
});
if (! elementMode) {
@@ -3437,7 +3437,7 @@ function markdeepToHTML(str, elementMode) {
function (match, prefix, ref) {
var link = toc[ref.toLowerCase().trim()];
if (link) {
- return prefix + ' ' + link + '';
+ return prefix + ' ' + link + '';
} else {
return prefix + ' ?';
}
@@ -3508,7 +3508,7 @@ function markdeepToHTML(str, elementMode) {
// They may also have an extra syntax-highlighting span
str = str.rp(/\n]*>()?([A-Za-z_][A-Za-z_\.0-9:\->]*)(<\/span>)?(\(\)|\[\])?<\/code>/g, function (match, syntaxHighlight, name, syntaxHighlightEnd, next) {
var linkName = name + (next ? (next[0] === '(' ? '-fcn' : next[0] === '[' ? '-array' : next[0]) : '');
- return apiDefinitionCount[linkName] ? entag('a', match, 'href="#apiDefinition-' + linkName + '"') : match;
+ return apiDefinitionCount[linkName] ? entag('a', match, 'href="#apiDefinition-' + linkName + '" target="_self"') : match;
});
}
@@ -4864,9 +4864,6 @@ function processInsertCommands(nodeArray, sourceArray, insertDoneCallback) {
//
// A url is relative if it does not begin with '^[a-z]{3,6}://|^#'
- // Protect code fences
- // TODO
-
function makeAbsoluteURL(url) {
return (/^[a-z]{3,6}:\/\//.test(url)) ?
url :
@@ -5360,6 +5357,13 @@ if (! window.alreadyProcessedMarkdeep) {
// to appear exceedingly narrow on phones in the Chrome mobile preview.
// https://developer.mozilla.org/en-US/docs/Mozilla/Mobile/Viewport_meta_tag
var META = '';
+ // Add a base tag if embedded in an