cinny icon indicating copy to clipboard operation
cinny copied to clipboard

Add support for rainbow and rainbowme commands and /html

Open RGBCube opened this issue 4 months ago • 5 comments

Type of change

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [x] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [ ] This change requires a documentation update

Checklist:

  • [x] My code follows the style guidelines of this project
  • [x] I have performed a self-review of my own code
  • [ ] I have commented my code, particularly in hard-to-understand areas
  • [ ] I have made corresponding changes to the documentation
  • [ ] My changes generate no new warnings

RGBCube avatar Oct 28 '25 23:10 RGBCube

Preview: https://2522--pr-cinny.netlify.app ⚠️ Exercise caution. Use test accounts. ⚠️

github-actions[bot] avatar Oct 28 '25 23:10 github-actions[bot]

Can confirm it works now:

image

Have also tested it with /html for a <details>, worked well.

RGBCube avatar Oct 29 '25 00:10 RGBCube

cc @ajbura can we get this in soon? this was a continuation of an older PR and the code has attribution

RGBCube avatar Oct 29 '25 11:10 RGBCube

Hey, @RGBCube currently the rainbow commands renders the raw html if you put any other formatted text in your message. Also if we use the plain text only to generate the rainbow html we will loose the formatting entirely which will create another issue. So I think we probably need to tweak the algorithm so it can process html without breaking it?

ajbura avatar Oct 30 '25 01:10 ajbura

Hey, @RGBCube currently the rainbow commands renders the raw html if you put any other formatted text in your message. Also if we use the plain text only to generate the rainbow html we will loose the formatting entirely which will create another issue. So I think we probably need to tweak the algorithm so it can process html without breaking it?

Ah, yeah I hadn't thought of that. It would be easy to simply ignore any markdown and send as-is, or we could treat it as a dom and recurse inwards. I think the latter is better, I'll try to tackle it.

RGBCube avatar Oct 30 '25 14:10 RGBCube