This is frustrating when making certain kinds of plugins. For example, you want to pass in some HTML, but you can’t because perchance decides the block isn’t code anymore.

Ideally, all code within a [code block] would be ignored until its final ].

Oh while I’m on the topic… Please ignore any [] or {} inside of <script> tags or in things like onclick="" attributes. Would make life a lot easier ;p

  • @perchanceM
    link
    English
    3
    edit-2
    3 months ago

    if you actually have any understanding of real, regular JS… it drives you insane […] But seriously… it should just ignore stuff in [code blocks] entirely so you don’t have to have all this deep knowledge and you don’t have to go insane trying to understand it.

    I agree 100% - at some point I’ll fix all these issues. I’d like it to be a very thin/robust/predictable layer on top of raw web platform stuff.

    Where is any of this documented?!

    https://perchance.org/known-bugs which is linked from https://perchance.org/resources but I agree it’s not very easy to find, and these issues obviously ideally wouldn’t exist in the first place.

    So it turns < etc. into regular characters before passing it to the function or something?

    The problem here (and the way to mentally model this - CC @[email protected]) is that the output HTML is fully rendered without any Perchance-specific stuff first (i.e. just setting innerHTML), and then the square blocks are evaluated in any text nodes on the page. So the underlying issue is the same for your original request, and this question about < and &lt;. I’ll add this explanation to the existing item for this on /known-bugs page. I guess the simple way of explaining it is “HTML parsing gets priority”.

    But I agree it shouldn’t. So yeah it’s a silly bug, and the only reason I haven’t fixed it is because it’d be a breaking change, and so requires a manifest/versioning type thing to be added as a header HTML comment to existing generators which are relying on this ~bug.

    Thanks for bringing up the issue though - it’s nice to have fresh eyes on this stuff, and hearing complaints helps me prioritize.

    • @wthit56OP
      link
      English
      13 months ago

      Oh, I see… I guess that’s why it works out like that. Thanks for explaining.

      I kind of enjoy this stuff. For a number of years I was part of a somewhat niche community for another user-creation platform for video games called Dreams. I taught, helped, answered questions, and wrote my own documentation just through reverse-engineering stuff within the engine.

      I’ve already started on one for perchance, just explaining the methods/properties on list nodes. thinking of doing more, but some of this stuff is quite hard to figure out by myself–and a lot of it just isn’t explicitly explained anywhere.

      Dreams had the same issue: great software with really deep features that no one but the devs understood or knew existed. So I’d scour their streams for clues to such features, then explore them fully in the engine to get as accurate a picture of it as I could–then added it to my documentation.

      Hard work, but I seem to just enjoy stuff like that. ;p

        • @wthit56OP
          link
          English
          13 months ago

          Nice–I’ll check those out too 👍