mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-24 00:36:16 -04:00
Overhauled Highlighting to work with new editor and support multiple selections
This commit is contained in:
parent
2785459257
commit
890f645eeb
8 changed files with 104 additions and 393 deletions
|
@ -186,7 +186,7 @@ async function getDishTitle(data) {
|
|||
*
|
||||
* @param {Object[]} recipeConfig
|
||||
* @param {string} direction
|
||||
* @param {Object} pos - The position object for the highlight.
|
||||
* @param {Object[]} pos - The position object for the highlight.
|
||||
* @param {number} pos.start - The start offset.
|
||||
* @param {number} pos.end - The end offset.
|
||||
*/
|
||||
|
|
|
@ -76,7 +76,7 @@ class ToHex extends Operation {
|
|||
}
|
||||
|
||||
const lineSize = args[1],
|
||||
len = (delim === "\r\n" ? 1 : delim.length) + commaLen;
|
||||
len = delim.length + commaLen;
|
||||
|
||||
const countLF = function(p) {
|
||||
// Count the number of LFs from 0 upto p
|
||||
|
@ -105,7 +105,7 @@ class ToHex extends Operation {
|
|||
* @returns {Object[]} pos
|
||||
*/
|
||||
highlightReverse(pos, args) {
|
||||
let delim, commaLen;
|
||||
let delim, commaLen = 0;
|
||||
if (args[0] === "0x with comma") {
|
||||
delim = "0x";
|
||||
commaLen = 1;
|
||||
|
@ -114,7 +114,7 @@ class ToHex extends Operation {
|
|||
}
|
||||
|
||||
const lineSize = args[1],
|
||||
len = (delim === "\r\n" ? 1 : delim.length) + commaLen,
|
||||
len = delim.length + commaLen,
|
||||
width = len + 2;
|
||||
|
||||
const countLF = function(p) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue