From e0fd79de4db48690776f97033b39d1c8a7393f8b Mon Sep 17 00:00:00 2001 From: Igor Chubin Date: Thu, 19 Jul 2018 08:57:39 +0000 Subject: [PATCH] add / to the section names in :list (fixes #73, fixes #77) --- lib/get_answer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/get_answer.py b/lib/get_answer.py index a5eb81c..6a7d8e2 100644 --- a/lib/get_answer.py +++ b/lib/get_answer.py @@ -95,7 +95,7 @@ def _isdir(topic): return os.path.isdir(topic) def _get_answers_and_dirs(): topics = glob.glob(PATH_CHEAT_SHEETS + "*") - answer_dirs = [_remove_initial_underscore(os.path.split(topic)[1]) + answer_dirs = [_remove_initial_underscore(os.path.split(topic)[1]).rstrip('/')+'/' for topic in topics if _isdir(topic)] answers = [os.path.split(topic)[1] for topic in topics if not _isdir(topic)] return answer_dirs, answers