GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(texteditor): align markdown output with Perseus grammar by rtibbles · Pull Request #5891 · learningequality/studio

Conversation

@rtibbles

@rtibbles rtibbles commented May 11, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Summary

  • Underline: serialise as __text__; preprocessor rewrites it back to <u> before marked runs so it isn't re-parsed as <strong> - was previously being encoded as because of commonmark usage.
  • Super/subscript: toolbar buttons hidden — Perseus has no <sup>/<sub> rule, needs a different approach later.
Screenshot
Editor with hidden script buttons and underlined "rainbow"

References

Closes #5887

Reviewer guidance

Test:

  1. Create an exercise with an underlined word, save and publish, verify it renders underlined in Kolibri (the original bug).
  2. Reopen the saved question — underline should round-trip as underline, not bold.
  3. Confirm super/subscript buttons no longer appear in the toolbar.

AI usage

Used Claude Code (Opus 4.7) to implement the markdown fix via TDD: failing tests first for both the serializer and preprocessor, then minimal changes. I reviewed each step and supplied the Perseus grammar reference. The EditorToolbar.vue commit was hand-written.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
rtibbles and others added 2 commits May 11, 2026 13:17
@rtibbles @claude
fix(texteditor): emit __ for underline to match Perseus markdown grammar
2be6435
Perseus's simple-markdown (kolibri-perseus-viewer) treats `__text__` as
`<u>`, while marked (CommonMark) treats it as `<strong>`. The serializer
now emits `__text__` for the underline mark, and `preprocessMarkdown`
rewrites `__text__` to `<u>text</u>` before marked sees it so the
round-trip back into TipTap preserves underline instead of converting
it to bold.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@rtibbles
Temporarily disable foramtting not supported by perseus flavour markd…
3e15eff
…own.
@rtibbles
rtibbles marked this pull request as ready for review May 11, 2026 22:06
marcellamaki
marcellamaki approved these changes May 11, 2026
View reviewed changes

@marcellamaki marcellamaki left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While I feel less confident about knowing every edge case here, this seems to be working exactly as intended, and the code is quite redable/logical and the comments are helpful.

I was able to verify all 3 criteria through my own testing, although I suppose we should let @pcenov give the final approval in the end. For now, I think this is ready to merge into hotfixes so he can check

(Please do not fret about the confusing bold, super/subscript rendering -- I didn't actually edit the formatting for those, i was writing myself a to-do list of what to check 😹)

Image

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

pcenov and radinamatic reacted with thumbs up emoji
All reactions
  • 👍 2 reactions
@rtibbles
rtibbles merged commit d82db06 into learningequality:hotfixes May 11, 2026
22 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@rtibbles
rtibbles deleted the markdown_edit branch May 11, 2026 23:34
@pcenov pcenov mentioned this pull request May 12, 2026
Text editor - Follow-up to 'fix(texteditor): align markdown output with Perseus grammar' #5894
Closed
This was referenced May 12, 2026
Exercises - New Rich Text Editor - Some items are not displayed correctly in Kolibri #5887
Closed
2026.05.13 Release #5902
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@marcellamaki marcellamaki marcellamaki approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@rtibbles @marcellamaki
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.