From 382ad016d30fca3819bc30ba0efc4218ba925d39 Mon Sep 17 00:00:00 2001 From: Meng Zhuo Date: Thu, 20 Jun 2013 10:15:00 +0800 Subject: [PATCH] set a proper name to function --- UltiSnips/rst.snippets | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/UltiSnips/rst.snippets b/UltiSnips/rst.snippets index ea70d81..1eba274 100644 --- a/UltiSnips/rst.snippets +++ b/UltiSnips/rst.snippets @@ -94,7 +94,7 @@ endsnippet global !p import re from collections import Counter -def find_all_code_type(path): +def get_popular_code_type(path): with open(path) as source: types = re.findall(r'[:|\.\.\s]code::?\s(\w+)', source.read()) try: @@ -105,7 +105,7 @@ def find_all_code_type(path): return popular_type endglobal snippet cb "Code Block" b -.. code-block:: ${1:`!p snip.rv = find_all_code_type(path)`} +.. code-block:: ${1:`!p snip.rv = get_popular_code_type(path)`} ${2:code}