tosher / Mediawiker

A plugin for Sublime Text editor that adds possibility to use it as Wiki Editor on MediaWiki-based sites like Wikipedia and many other.
Other
137 stars 27 forks source link

save raw summary excluding post/prefix #155

Closed RheingoldRiver closed 4 years ago

RheingoldRiver commented 4 years ago

Use summary_input param in post_page so that the buffer doesn't keep recursively re-adding the postfix/prefix. Also change one time summary was called as a named param so it doesn't break with this change.

I'm not sure if another change needs to be made here or not though:

    def on_done(self, summary=None):
        if summary is None:
            summary = ''

        if not utils.api.page_can_edit(self.page):
            self.set_summary_buffer(summary)
            utils.error_message(utils.api.PAGE_CANNOT_EDIT_MESSAGE)
            return

        self.post_page(summary)
tosher commented 4 years ago

Thanks, little different fix with minor flag fix (broken by prefix)

https://github.com/tosher/Mediawiker/releases/tag/v3.6.2