fix RSOD with format:variable operator

This commit is contained in:
pmario 2024-05-01 13:01:34 +02:00
parent 056a6daa58
commit 0662aa34f4
1 changed files with 8 additions and 8 deletions

View File

@ -310,17 +310,17 @@ exports.slowInSlowOut = function(t) {
};
exports.formatVariableString = function(template,options) {
var name = options.name || "",
params = options.params || "",
var result = "",
firstLine = "",
os = options.srcVariable,
type = (os.isFunctionDefinition) ? "\\\\function" : (os.isMacroDefinition) ? "\\\\define" :
name = options.name || "",
params = options.params || "",
os = options.srcVariable || options.name;
var type = (os.isFunctionDefinition) ? "\\\\function" : (os.isMacroDefinition) ? "\\\\define" :
(os.isProcedureDefinition) ? "\\\\procedure" : (os.isWidgetDefinition) ? "\\\\widget" : "",
varType = (os.isFunctionDefinition) ? "fn" : (os.isMacroDefinition) ? "macro" :
(os.isProcedureDefinition) ? "proc" : (os.isWidgetDefinition) ? "widget" : "var";
var result = "",
t = (!os.isFunctionDefinition && !os.isMacroDefinition && !os.isProcedureDefinition && !os.isWidgetDefinition) ? "$name$" : template,
matches = [
var t = (!os.isFunctionDefinition && !os.isMacroDefinition && !os.isProcedureDefinition && !os.isWidgetDefinition) ? "$name$" : template;
var matches = [
[/^\$type\$/i, function() {
return (type) ? type : "";
}],