trying this: https://perchance.org/preprocessors

so i didn’t get it to work and eventually did the simplest form but gives error.

i started with altering my name just to mess with stuff


$output(text) =>
  text.replaceAll("Allo","~allo~");
  return text;

(all the examples have the ; so maybe it needs em)

is all the preprocessor is.
and the importerizor is just:
$preprocess = {import:allopreprocess}

yet terrible error: TypeError: Cannot read properties of undefined (reading 'getSelf') at Object.get

i pretty much copypasted stuff and changed a few variables so i is the confuze as to how wrong

  • alloOP
    link
    English
    28 months ago

    Ok I have figured it out I think. There initially was no actual problem. for some reason, initially upon adding a preprocessor, there is a mysterious error message that pops up any time it is run within the edit window. But do fullscreen and reload the page and the error message goes away and, interestingly, entering edit mode again the error doesn’t come back.

    can be seen easily by going here https://perchance.org/inline-dent-preprocessor then hitting edit, then hitting save. then see error message. that error message is what i was getting and was is apparently solved by going fullscreen and reloading page.

    • VioneTM
      link
      English
      18 months ago

      Yeah, I think it is because ‘preprocessor’ is applied before everything else. Which throws error upon first run, then the content is then cached/preloaded, which then resolves itself after.