[geany/geany-plugins] 45d9ba: addons/tasks: Stript comment-closing sequence from task text

Quentin Glidic git-noreply at xxxxx
Fri Jun 17 12:55:14 UTC 2016


Branch:      refs/heads/master
Author:      Quentin Glidic <sardemff7+git at sardemff7.net>
Committer:   Quentin Glidic <sardemff7+git at sardemff7.net>
Date:        Fri, 17 Jun 2016 12:55:14 UTC
Commit:      45d9badc60c2f00a2f1abce57f9be8fdbb936033
             https://github.com/geany/geany-plugins/commit/45d9badc60c2f00a2f1abce57f9be8fdbb936033

Log Message:
-----------
addons/tasks: Stript comment-closing sequence from task text

Signed-off-by: Quentin Glidic <sardemff7+git at sardemff7.net>


Modified Paths:
--------------
    addons/src/ao_tasks.c

Modified: addons/src/ao_tasks.c
7 lines changed, 6 insertions(+), 1 deletions(-)
===================================================================
@@ -559,7 +559,7 @@ static void create_task(AoTasks *t, GeanyDocument *doc, gint line, const gchar *
 static void update_tasks_for_doc(AoTasks *t, GeanyDocument *doc)
 {
 	gint lexer, lines, line, last_pos = 0, style;
-	gchar *line_buf, *display_name, *task_start;
+	gchar *line_buf, *display_name, *task_start, *closing_comment;
 	gchar **token;
 	AoTasksPrivate *priv = AO_TASKS_GET_PRIVATE(t);
 
@@ -588,6 +588,11 @@ static void update_tasks_for_doc(AoTasks *t, GeanyDocument *doc)
 				/* reset task_start in case there is no text following */
 				if (EMPTY(task_start))
 					task_start = line_buf;
+				else if ((EMPTY(doc->file_type->comment_single) ||
+					strstr(line_buf, doc->file_type->comment_single) == NULL) &&
+					!EMPTY(doc->file_type->comment_close) &&
+					(closing_comment = strstr(task_start, doc->file_type->comment_close)) != NULL)
+					*closing_comment = '\0';
 				/* create the task */
 				create_task(t, doc, line, *token, line_buf, task_start, display_name);
 				/* if we found a token, continue on next line */



--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).


More information about the Plugins-Commits mailing list