Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement nested formatting tags #138

Merged
merged 4 commits into from
May 26, 2024
Merged

Conversation

D-Cysteine
Copy link

Implement nested formatting tags, and also add tags for text formatting: bold, italic, underline, strikethrough, obfuscated.

This lets us do things like:

[warning]Do [bold]NOT[/bold] build machines in the §9rain§r![/warning]

and have it all work as expected.


This PR also changes the semantics of the [url] tag: instead of being able to specify alternate anchor text for the URL using a text= param, now the link itself can be specified using a link= param, in which case the text inside the [url] tag is used as the anchor text. This change allows applying formatting to the anchor text. I searched the quest database, and didn't find any current usages of the text= param, so I think that this is a safe change, but it's possible that I missed something.

I've done some basic testing of the new [url] handling, and everything seems to work, except when there is an [img] tag, in which case the hot zones for all [url] tags beyond the [img] tag are placed incorrectly. I checked master and it's broken in the same way, so I think this PR neither fixes nor worsens this issue. I'll file a separate issue for fixing [img] and [url] tomorrow.

I think it wouldn't work properly anyway without more extensive code changes
Copy link

@Steelux8 Steelux8 left a comment

Choose a reason for hiding this comment

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

Looks good, thank you for improving the formatting features.

@Dream-Master Dream-Master merged commit 0e9c5b2 into master May 26, 2024
1 check passed
@Dream-Master Dream-Master deleted the nested-formatting-tags branch May 26, 2024 22:00
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.

3 participants