Skip to content

Adds support for strikethrough on note

PR for Issue #77

I have connected to the populate_connect signal in the HyperTextView to add a Strikethrough option to the context menu. I have added a strikethrough tag to the HyperTextView with the strikethrough affect.

I have then extended the update_tags method to scan for any text that should have the Strikethrough tag added. Given that this method only checks for links, and now strikethrough it's down in a separate while loop. I wasn't familiar enough with GTK to know if the TextIterator could search for patterns.

For storage, assuming that all notes are stored in plain text format like mine were (??) I have opted to store as markdown format. Wrapping the selected text in text that should be strikethrough. There may be a better way to do this? Although as notes seem to be stored in plain text I don't know what the alternative would be.

Like links when a note is opened these are then being searched for in the update_tags method to apply the strikethrough affect.

Merge request reports