[pinpoint] Make sure that ignored comments are not shown as text
- From: Lionel Landwerlin <llandwerlin src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pinpoint] Make sure that ignored comments are not shown as text
- Date: Fri, 7 Aug 2015 22:24:32 +0000 (UTC)
commit 42a98beff800634a894b247bb0d1c30c83f3023b
Author: Till Maas <opensource till name>
Date: Fri Aug 7 19:27:12 2015 +0200
Make sure that ignored comments are not shown as text
If comments are ignored, they should be skipped instead of being treated as
regular text.
pinpoint.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/pinpoint.c b/pinpoint.c
index 6062f7d..9ae75c3 100644
--- a/pinpoint.c
+++ b/pinpoint.c
@@ -952,17 +952,19 @@ pp_parse_slides (PinPointRenderer *renderer,
}
break;
case '#': /* comment */
- if (startofline && ! pp_ignore_comments)
+ if (startofline)
{
const char *end = p + 1;
while (*end != '\n' && *end != '\0')
{
- g_string_append_c (notes_str, *end);
+ if (!pp_ignore_comments)
+ g_string_append_c (notes_str, *end);
end++;
}
if (end)
{
- g_string_append_c (notes_str, '\n');
+ if (!pp_ignore_comments)
+ g_string_append_c (notes_str, '\n');
p = end;
break;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]