Skip to content

Commit

Permalink
deploy: 0557872
Browse files Browse the repository at this point in the history
  • Loading branch information
abdes committed Nov 28, 2022
1 parent 5142f3d commit 8302366
Show file tree
Hide file tree
Showing 52 changed files with 525 additions and 400 deletions.
Binary file modified asap_master/_doctrees/changelog.doctree
Binary file not shown.
Binary file modified asap_master/_doctrees/documentation/doxygen-doc.doctree
Binary file not shown.
Binary file modified asap_master/_doctrees/documentation/index.doctree
Binary file not shown.
Binary file modified asap_master/_doctrees/documentation/sphinx-doc.doctree
Binary file not shown.
Binary file modified asap_master/_doctrees/environment.pickle
Binary file not shown.
Binary file modified asap_master/_doctrees/getting-started/customizing.doctree
Binary file not shown.
Binary file modified asap_master/_doctrees/getting-started/devenv.doctree
Binary file not shown.
Binary file modified asap_master/_doctrees/getting-started/get-the-code.doctree
Binary file not shown.
Binary file modified asap_master/_doctrees/getting-started/get-updates.doctree
Binary file not shown.
Binary file modified asap_master/_doctrees/getting-started/index.doctree
Binary file not shown.
Binary file modified asap_master/_doctrees/getting-started/structure.doctree
Binary file not shown.
Binary file modified asap_master/_doctrees/getting-started/useful-commands.doctree
Binary file not shown.
Binary file modified asap_master/_doctrees/index.doctree
Binary file not shown.
Binary file modified asap_master/_doctrees/library-modules/index.doctree
Binary file not shown.
Binary file modified asap_master/_doctrees/license.doctree
Binary file not shown.
Binary file modified asap_master/_doctrees/project-development/build.doctree
Binary file not shown.
Binary file modified asap_master/_doctrees/project-development/devflow.doctree
Binary file not shown.
Binary file modified asap_master/_doctrees/project-development/index.doctree
Binary file not shown.
Binary file modified asap_master/_doctrees/project-development/modules.doctree
Binary file not shown.
Binary file modified asap_master/_doctrees/project-development/third_party.doctree
Binary file not shown.
Binary file modified asap_master/_doctrees/tools/index.doctree
Binary file not shown.
Binary file modified asap_master/_doctrees/version.doctree
Binary file not shown.
2 changes: 1 addition & 1 deletion asap_master/html/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 1b2f382e248c27837a1d648f6ca0e42f
config: 2dcf75e3492ef249f92b2412681c8a32
tags: 645f666f9bcd5a90fca523b33c5a78b7
3 changes: 2 additions & 1 deletion asap_master/html/_static/copybutton.css
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ div.highlight {
position: relative;
}

.highlight:hover button.copybtn {
/* Show the copybutton */
.highlight:hover button.copybtn, button.copybtn.success {
opacity: 1;
}

Expand Down
42 changes: 35 additions & 7 deletions asap_master/html/_static/copybutton.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,18 +102,25 @@ const clearSelection = () => {
}
}

// Changes tooltip text for two seconds, then changes it back
// Changes tooltip text for a moment, then changes it back
// We want the timeout of our `success` class to be a bit shorter than the
// tooltip and icon change, so that we can hide the icon before changing back.
var timeoutIcon = 2000;
var timeoutSuccessClass = 1500;

const temporarilyChangeTooltip = (el, oldText, newText) => {
el.setAttribute('data-tooltip', newText)
el.classList.add('success')
setTimeout(() => el.setAttribute('data-tooltip', oldText), 2000)
setTimeout(() => el.classList.remove('success'), 2000)
// Remove success a little bit sooner than we change the tooltip
// So that we can use CSS to hide the copybutton first
setTimeout(() => el.classList.remove('success'), timeoutSuccessClass)
setTimeout(() => el.setAttribute('data-tooltip', oldText), timeoutIcon)
}

// Changes the copy button icon for two seconds, then changes it back
const temporarilyChangeIcon = (el) => {
el.innerHTML = iconCheck;
setTimeout(() => {el.innerHTML = iconCopy}, 2000)
setTimeout(() => {el.innerHTML = iconCopy}, timeoutIcon)
}

const addCopyButtonToCodeCells = () => {
Expand All @@ -125,7 +132,8 @@ const addCopyButtonToCodeCells = () => {
}

// Add copybuttons to all of our code cells
const codeCells = document.querySelectorAll('div.highlight pre')
const COPYBUTTON_SELECTOR = 'div.highlight pre';
const codeCells = document.querySelectorAll(COPYBUTTON_SELECTOR)
codeCells.forEach((codeCell, index) => {
const id = codeCellId(index)
codeCell.setAttribute('id', id)
Expand All @@ -141,10 +149,25 @@ function escapeRegExp(string) {
return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string
}

/**
* Removes excluded text from a Node.
*
* @param {Node} target Node to filter.
* @param {string} exclude CSS selector of nodes to exclude.
* @returns {DOMString} Text from `target` with text removed.
*/
function filterText(target, exclude) {
const clone = target.cloneNode(true); // clone as to not modify the live DOM
if (exclude) {
// remove excluded nodes
clone.querySelectorAll(exclude).forEach(node => node.remove());
}
return clone.innerText;
}

// Callback when a copy button is clicked. Will be passed the node that was clicked
// should then grab the text and replace pieces of text that shouldn't be used in output
function formatCopyText(textContent, copybuttonPromptText, isRegexp = false, onlyCopyPromptLines = true, removePrompts = true, copyEmptyLines = true, lineContinuationChar = "", hereDocDelim = "") {

var regexp;
var match;

Expand Down Expand Up @@ -199,7 +222,12 @@ function formatCopyText(textContent, copybuttonPromptText, isRegexp = false, onl

var copyTargetText = (trigger) => {
var target = document.querySelector(trigger.attributes['data-clipboard-target'].value);
return formatCopyText(target.innerText, '', false, true, true, true, '', '')

// get filtered text
let exclude = '.linenos, .gp';

let text = filterText(target, exclude);
return formatCopyText(text, '', false, true, true, true, '', '')
}

// Initialize with a callback so we can modify the text before copy
Expand Down
17 changes: 16 additions & 1 deletion asap_master/html/_static/copybutton_funcs.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,25 @@ function escapeRegExp(string) {
return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string
}

/**
* Removes excluded text from a Node.
*
* @param {Node} target Node to filter.
* @param {string} exclude CSS selector of nodes to exclude.
* @returns {DOMString} Text from `target` with text removed.
*/
export function filterText(target, exclude) {
const clone = target.cloneNode(true); // clone as to not modify the live DOM
if (exclude) {
// remove excluded nodes
clone.querySelectorAll(exclude).forEach(node => node.remove());
}
return clone.innerText;
}

// Callback when a copy button is clicked. Will be passed the node that was clicked
// should then grab the text and replace pieces of text that shouldn't be used in output
export function formatCopyText(textContent, copybuttonPromptText, isRegexp = false, onlyCopyPromptLines = true, removePrompts = true, copyEmptyLines = true, lineContinuationChar = "", hereDocDelim = "") {

var regexp;
var match;

Expand Down
4 changes: 2 additions & 2 deletions asap_master/html/_static/documentation_options.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
var DOCUMENTATION_OPTIONS = {
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
VERSION: '4.6.1 (47cc57907bd7)',
LANGUAGE: 'None',
VERSION: '4.6.2 (0557872ffa78)',
LANGUAGE: 'en',
COLLAPSE_INDEX: false,
BUILDER: 'html',
FILE_SUFFIX: '.html',
Expand Down
Loading

0 comments on commit 8302366

Please sign in to comment.