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

Fixes markup [sup] followed by [sub] doesn't work (issue #8077) #8435

Merged
merged 4 commits into from Nov 18, 2023

Conversation

azinneck0485
Copy link
Contributor

@azinneck0485 azinneck0485 commented Nov 4, 2023

Made changes to markup.py to fix #8077

Fix was to add a condition wh < pph to the logic used to calculate script_pos for sub-/superscript in render_lines method. This means the "if condition" is only evaluated when nested, otherwise the "else condition" is evaluated and used in the calculation.

Tested with the following file, which builds on the test script in the original issue report:
Issue8077_test.zip

Output display, showing multiple variations of sub and sup, including nested conditions:
image

Please let me know if there are any other tests I should run (I did not see anything in the documentation), additional changes that need to be make, or if I should make the pull request against a different branch.
 

Maintainer merge checklist

  • Title is descriptive/clear for inclusion in release notes.
  • Applied a Component: xxx label.
  • Applied the api-deprecation or api-break label.
  • Applied the release-highlight label to be highlighted in release notes.
  • Added to the milestone version it was merged into.
  • Unittests are included in PR.
  • Properly documented, including versionadded, versionchanged as needed.

Copy link

welcome bot commented Nov 4, 2023

Thanks for opening your first pull request here! 💖 Please check out our contributing guidelines.

@misl6
Copy link
Member

misl6 commented Nov 5, 2023

Hi @azinneck0485 ,

The automated PEP8 check is failing, can you take care of it?

@azinneck0485
Copy link
Contributor Author

I fixed the places in markup.py where the changes I made failed the PEP8 check in my latest commit

Copy link
Member

@misl6 misl6 left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you!

(merging the PR as-is, but if you want to add some tests and refactor that part to have a better readable code, no one will complain about it. 😅)

@misl6 misl6 changed the title Fix: Markup [sup] followed by [sub] doesn't work [Issue #8077] Fixes markup [sup] followed by [sub] doesn't work (issue #8077) Nov 18, 2023
@misl6 misl6 added this to the 2.3.0 milestone Nov 18, 2023
@misl6 misl6 merged commit 1e3e520 into kivy:master Nov 18, 2023
34 checks passed
Copy link

welcome bot commented Nov 18, 2023

Congrats on merging your first pull request! 🎉🎉🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Markup [sup] followed by [sub] doesn't work
2 participants