https://perchance.org/8swe0svvsk#edit

The same exact call in a code block vs a script tag behaves differently. The values seem to arrive to the plugin okay, but then get funky at some point–no idea why.

  • perchance@lemmy.worldM
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 month ago

    If there was simply a difference between a string made with perchance (or explicitly perchance-ified), which has all the extras attached, and a string you just make in JavaScript, then none of this would be an issue.

    Wait, this sounds like a separate bug report. The issue I’m talking about is (I thought) only relevant to Perchance nodes, not raw strings. Can you give an example where Perchance interferes with your <script> tag where the text you’re manipulating doesn’t come from a Perchance node/property?

    • wthit56@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 month ago

      The example I linked you to in the original post uses pure JS to produce the problem, yes. 😅 https://perchance.org/8swe0svvsk#edit

      The original issue was a script tag passing a JS-made string into a function. Versus a code block passing a JS-made string into a function. The same exact string, declared in JS. But the function call was from a script tag vs from a code block. That JS-made string would evaluate differently depending on whether a script was being processed at the time or a code block was being processed at the time. Something like that.

      • perchance@lemmy.worldM
        link
        fedilink
        English
        arrow-up
        1
        ·
        edit-2
        1 month ago

        Oh, right, yes, when using evaluateText on said string, that makes sense - due to square blocks having the policy of always “saving escape-char-processing until right at the end” as mentioned above. And yeah I agree this inconsistency is very annoying!