Skip to content

Commit

Permalink
fix crash in case no filetype
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamin-kirkbride committed Jul 3, 2023
1 parent 65c71bd commit 6753a1e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions porcupine/plugins/markdown.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def on_tab_key(
tab: tabs.FileTab, event: tkinter.Event[textutils.MainText], shift_pressed: bool
) -> str | None:
"""Indenting and dedenting list items"""
if tab.settings.get("filetype_name", str) == "Markdown":
if tab.settings.get("filetype_name", object) == "Markdown":
line = event.widget.get("insert linestart", "insert lineend")
list_item_status = _list_item(line)

Expand All @@ -70,7 +70,7 @@ def continue_list(tab: tabs.FileTab, event: tkinter.Event[tkinter.Text]) -> str
This happens after the `autoindent` plugin automatically handles indentation
"""
if tab.settings.get("filetype_name", str) == "Markdown":
if tab.settings.get("filetype_name", object) == "Markdown":
current_line = event.widget.get("insert - 1l linestart", "insert -1l lineend")
list_item_match = _list_item(current_line)
if list_item_match:
Expand Down

0 comments on commit 6753a1e

Please sign in to comment.