[geany/geany-plugins] a65ac0: GeanyLaTeX: Fix inserting of cites having spaces inside catalog in front of the @

Frank Lanitz git-noreply at xxxxx
Thu Oct 16 18:35:49 UTC 2014


Branch:      refs/heads/master
Author:      Frank Lanitz <frank at frank.uvena.de>
Committer:   Frank Lanitz <frank at frank.uvena.de>
Date:        Thu, 16 Oct 2014 18:35:49 UTC
Commit:      a65ac04ad13c0b467876bd0d622ba58604bba477
             https://github.com/geany/geany-plugins/commit/a65ac04ad13c0b467876bd0d622ba58604bba477

Log Message:
-----------
GeanyLaTeX: Fix inserting of cites having spaces inside catalog in front of the @


Modified Paths:
--------------
    geanylatex/src/bibtex.c

Modified: geanylatex/src/bibtex.c
4 lines changed, 2 insertions(+), 2 deletions(-)
===================================================================
@@ -214,7 +214,7 @@ void glatex_parse_bib_file(const gchar* file, gpointer combobox)
 		{
 			for (i = 0; bib_entries[i] != NULL ; i++)
 			{
-				if  (g_str_has_prefix(bib_entries[i], "@"))
+				if  (g_str_has_prefix(g_strchug(bib_entries[i]), "@"))
 				{
 					tmp = glatex_parseLine_bib(bib_entries[i]);
 					tmp_label_name = g_strdup(tmp->label_name);
@@ -252,6 +252,6 @@ LaTeXLabel* glatex_parseLine_bib(const gchar *line)
 		l++;
 		x++;
 	}
-	label->label_name = g_strndup(tmp_string, l - 1);
+	label->label_name = g_strstrip(g_strndup(tmp_string, l - 1));
 	return label;
 }



--------------
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