@@ 103-125 (lines=23) @@ | ||
100 | return _comment |
|
101 | ||
102 | ||
103 | def _comment_counter(_comment): |
|
104 | """ |
|
105 | ||
106 | counter comment tips and split into list |
|
107 | """ |
|
108 | ||
109 | x = lambda l: l.strip().strip("#").strip() |
|
110 | ||
111 | _counter = [] |
|
112 | if _comment.startswith("\n"): |
|
113 | _counter.append("") |
|
114 | _counter.append(x(_comment[1:])) |
|
115 | ||
116 | return _counter |
|
117 | elif _comment.startswith("#\n"): |
|
118 | _counter.append("") |
|
119 | _counter.append(x(_comment[2:])) |
|
120 | else: |
|
121 | index = _comment.find("\n") |
|
122 | _counter.append(x(_comment[:index])) |
|
123 | _counter.append(x(_comment[index + 1:])) |
|
124 | ||
125 | return _counter |
|
126 | ||
127 | ||
128 | def _obtain_comment(_m_comment, _t_comment): |
@@ 103-125 (lines=23) @@ | ||
100 | return _comment |
|
101 | ||
102 | ||
103 | def _comment_counter(_comment): |
|
104 | """ |
|
105 | ||
106 | counter comment tips and split into list |
|
107 | """ |
|
108 | ||
109 | x = lambda l: l.strip().strip("#").strip() |
|
110 | ||
111 | _counter = [] |
|
112 | if _comment.startswith("\n"): |
|
113 | _counter.append("") |
|
114 | _counter.append(x(_comment[1:])) |
|
115 | ||
116 | return _counter |
|
117 | elif _comment.startswith("#\n"): |
|
118 | _counter.append("") |
|
119 | _counter.append(x(_comment[2:])) |
|
120 | else: |
|
121 | index = _comment.find("\n") |
|
122 | _counter.append(x(_comment[:index])) |
|
123 | _counter.append(x(_comment[index + 1:])) |
|
124 | ||
125 | return _counter |
|
126 | ||
127 | ||
128 | def _obtain_comment(_m_comment, _t_comment): |