+def reg_starts_white():
+ def starts_white(context, text):
+ if isinstance(text, list):
+ text = ''.join(text)
+ if not text:
+ return False
+ return text[0].isspace()
+ _register_function(starts_white)
+
+
+def reg_ends_white():
+ def ends_white(context, text):
+ if isinstance(text, list):
+ text = ''.join(text)
+ if not text:
+ return False
+ return text[-1].isspace()
+ _register_function(ends_white)
+
+