Skip to content

Conversation

@jaykim1213
Copy link
Contributor

Does this PR close any open issues?

Closes #900
Closes #972

Give a longer description of what this PR addresses and why it's needed

Fix required star appears in unexpected place when using markdown in the question prompt

Provide pictures/videos of the behavior before and after these changes (optional)

After
image

Before
image

Are there any additional TODOs before this PR is ready to go?

TODOs:
No

@github-actions
Copy link

github-actions bot commented Dec 18, 2025

🪓 PR closed, deleted preview.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes the positioning of the required asterisk (*) in markdown prompts by improving the algorithm that locates where to insert the asterisk. Previously, the asterisk would appear in unexpected positions when markdown formatting was used in question prompts. The fix ensures the asterisk always appears at the end of the actual text content.

Key Changes:

  • Updated the algorithm to first find the last non-empty text node, then locate its parent Element, instead of simply finding the last Element
  • Added logic to determine when a space is needed before the last word when inserting the asterisk

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jaykim1213 jaykim1213 merged commit 22149bb into dev Jan 6, 2026
6 of 8 checks passed
@jaykim1213 jaykim1213 deleted the jk/requiredStar branch January 6, 2026 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Required star is not always at the end of the line Required star appears in unexpected place when using markdown in the question prompt

3 participants