]> git.wincent.com - wikitext.git/commitdiff
Add comment justifying the scope_includes_space variable
authorWincent Colaiuta <win@wincent.com>
Thu, 7 May 2009 22:30:54 +0000 (00:30 +0200)
committerWincent Colaiuta <win@wincent.com>
Thu, 7 May 2009 22:30:54 +0000 (00:30 +0200)
This comment serves as a reminder for why this variable exists
(to remember what was on the stack prior to popping); without
it the reader might ask "why do we have a temporary variable
here which is only used once?".

Signed-off-by: Wincent Colaiuta <win@wincent.com>
ext/parser.c

index a7592677dce39c5184ce36bcd571547723a6fda3..e3ed3484eaec9dfa4c58e7ae842cb5480c264134 100644 (file)
@@ -902,7 +902,7 @@ void _Wikitext_rollback_failed_external_link(parser_t *parser)
 {
     if (!IN(EXT_LINK_START))
         return; // nothing to do!
-    int scope_includes_space = IN(SPACE);
+    int scope_includes_space = IN(SPACE); // remember this before popping
     _Wikitext_pop_from_stack_up_to(parser, Qnil, EXT_LINK_START, Qtrue);
     rb_str_cat(parser->output, ext_link_start, sizeof(ext_link_start) - 1);
     if (!NIL_P(parser->link_target))