Skip to content
New issue

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

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

Already on GitHub? # to your account

Add "Convert text markup" feature #507

Merged
merged 1 commit into from
Oct 28, 2024

Conversation

windymilla
Copy link
Collaborator

In new Text menu, button pops a dialog from where the user can convert <i>/</i>, etc. to the text file markup characters, e.g. _.
These characters are configurable and are stored in the Prefs file.
Can also convert small caps to ALLCAPS, and convert
thought breaks from <tb> to * *...

Fixes #465

In new Text menu, button pops a dialog from where the
user can convert `<i>`/`</i>`, etc. to the text file markup
characters, e.g. `_`.
These characters are configurable and are stored in the
Prefs file.
Can also convert small caps to ALLCAPS, and convert
thought breaks from `<tb>` to `       *       *...`
@windymilla windymilla requested a review from srjfoo October 25, 2024 20:01
Copy link
Member

@srjfoo srjfoo left a comment

Choose a reason for hiding this comment

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

Works as advertised -- my only question is whether Undo should work if the widget is in the foreground. It doesn't on macOS; I have to switch back to the main text window.

@@ -1224,3 +1230,111 @@ def asterisk_check() -> None:
line, IndexRange(match.rowcol, end_rowcol), match.rowcol.col, end_rowcol.col
)
checker_dialog.display_entries()

Copy link
Member

Choose a reason for hiding this comment

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

Extra blank line?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No - the code prettifier forces 2 blank lines before the start of a new class (TextMarkupConvertorDialog), and 1 line between functions.

@windymilla
Copy link
Collaborator Author

Works as advertised -- my only question is whether Undo should work if the widget is in the foreground. It doesn't on macOS; I have to switch back to the main text window.

I've added an issue to consider this problem more generally - I don't think it would be right to just make it work for this particular dialog without further consideration. (Summary: it currently works in checker dialogs and Page Sep Fixup, which has undo/redo buttons)

@windymilla windymilla merged commit deb007f into DistributedProofreaders:master Oct 28, 2024
1 check passed
@windymilla windymilla deleted the text-markup branch October 28, 2024 16:09
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Text Markup Conversion Dialog
2 participants