#NEWLINE# def resolve_input( user_input ) : #NEWLINE# #INDENT# if isinstance ( user_input , str ) : #NEWLINE# #INDENT# s = sublime . load_settings ( 'AlignTab.sublime-settings' ) #NEWLINE# patterns = s . get ( 'named_patterns' , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# if ( user_input in patterns ) : #NEWLINE# #INDENT# user_input = patterns [ user_input ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( ( user_input == 'last_regex' ) and history . last ( ) ) : #NEWLINE# #INDENT# user_input = history . last ( ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# if isinstance ( user_input , str ) : #NEWLINE# #INDENT# user_input = [ user_input ] #NEWLINE# #UNINDENT# return user_input