Minor fixes for 2.0
This commit is contained in:
@@ -657,6 +657,7 @@ const CodeEditor = (props) => {
|
||||
}
|
||||
|
||||
if (!inputvariable.includes(".")) {
|
||||
inputvariable = inputvariable.toLowerCase()
|
||||
return inputvariable
|
||||
}
|
||||
|
||||
@@ -665,6 +666,9 @@ const CodeEditor = (props) => {
|
||||
var removedIndexes = 0
|
||||
for (var key in itemsplit) {
|
||||
var tmpitem = itemsplit[key]
|
||||
if (key == 0) {
|
||||
tmpitem = tmpitem.toLowerCase()
|
||||
}
|
||||
|
||||
// Makes sure #0 and # are same, as we only visualize first one anyway
|
||||
if (tmpitem.startsWith("#")) {
|
||||
@@ -695,20 +699,24 @@ const CodeEditor = (props) => {
|
||||
var variable_occurence = current_code_line.match(/[\\]{0,1}[$]{1}([a-zA-Z0-9_@-]+\.?){1}([a-zA-Z0-9#_@-]+\.?){0,}/g)
|
||||
|
||||
if (!variable_occurence) {
|
||||
continue;
|
||||
continue
|
||||
}
|
||||
|
||||
var new_occurences = variable_occurence.filter((occurrence) => occurrence[0]);
|
||||
variable_occurence = new_occurences
|
||||
//var new_occurences = variable_occurence.filter((occurrence) => occurrence[0]);
|
||||
//variable_occurence = new_occurences
|
||||
|
||||
variable_occurence = variable_occurence.filter((occurrence) => occurrence[0]);
|
||||
|
||||
// Checks code lines, not variable occurences. Then remaps later
|
||||
var dollar_occurence = [];
|
||||
for (let ch = 0; ch < current_code_line.length; ch++) {
|
||||
//if (current_code_line[ch] === '$' && (ch === 0)) {
|
||||
if (current_code_line[ch] === '$') {
|
||||
dollar_occurence.push(ch);
|
||||
dollar_occurence.push(ch)
|
||||
}
|
||||
}
|
||||
|
||||
// Lowercase anything between the $ and first .
|
||||
var dollar_occurence_len = []
|
||||
try {
|
||||
for (let occ = 0; occ < variable_occurence.length; occ++) {
|
||||
@@ -1005,7 +1013,6 @@ const CodeEditor = (props) => {
|
||||
|
||||
// Replace quotes with nothing
|
||||
} else {
|
||||
console.log("NO TYPE? ", typeof new_input)
|
||||
try {
|
||||
new_input = new_input.toString()
|
||||
} catch (e) {
|
||||
@@ -1897,7 +1904,7 @@ const CodeEditor = (props) => {
|
||||
overflow: "hidden",
|
||||
}}
|
||||
onClick={() => {
|
||||
console.log(innerdata.example)
|
||||
//console.log(innerdata.example)
|
||||
|
||||
//const handleClick = (item) => {
|
||||
handleItemClick([innerdata]);
|
||||
|
||||
Reference in New Issue
Block a user