[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[7196] parsetexi update
From: |
gavinsmith0123 |
Subject: |
[7196] parsetexi update |
Date: |
Sun, 29 May 2016 14:53:07 +0000 (UTC) |
Revision: 7196
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=7196
Author: gavin
Date: 2016-05-29 14:53:07 +0000 (Sun, 29 May 2016)
Log Message:
-----------
parsetexi update
Modified Paths:
--------------
trunk/tp/parsetexi/commands.c
trunk/tp/parsetexi/end_line.c
Modified: trunk/tp/parsetexi/commands.c
===================================================================
--- trunk/tp/parsetexi/commands.c 2016-05-29 13:30:10 UTC (rev 7195)
+++ trunk/tp/parsetexi/commands.c 2016-05-29 14:53:07 UTC (rev 7196)
@@ -104,50 +104,54 @@
/* We may replace this function with a macro, or represent this infomation in
command_data. */
int
-close_paragraph_command (enum command_id cmd_id)
+close_paragraph_command (enum command_id cmd)
{
+ if (cmd == CM_verbatim)
+ return 1;
+
/* Block commands except 'raw' and 'conditional'. */
- if (command_data(cmd_id).flags & CF_block)
+
+ if (command_data(cmd).flags & CF_block)
{
- if (command_data(cmd_id).data == BLOCK_conditional
- || command_data(cmd_id).data == BLOCK_raw)
+ if (command_data(cmd).data == BLOCK_conditional
+ || command_data(cmd).data == BLOCK_raw)
return 0;
- if (command_data(cmd_id).flags & CF_format_raw)
+ if (command_data(cmd).flags & CF_format_raw)
return 0;
return 1;
}
/* several others Common.pm:852 */
- if (cmd_id == CM_titlefont
- || cmd_id == CM_insertcopying
- || cmd_id == CM_sp
- || cmd_id == CM_verbatiminclude
- || cmd_id == CM_page
- || cmd_id == CM_item
- || cmd_id == CM_itemx
- || cmd_id == CM_tab
- || cmd_id == CM_headitem
- || cmd_id == CM_printindex
- || cmd_id == CM_listoffloats
- || cmd_id == CM_center
- || cmd_id == CM_dircategory
- || cmd_id == CM_contents
- || cmd_id == CM_shortcontents
- || cmd_id == CM_summarycontents
- || cmd_id == CM_caption
- || cmd_id == CM_shortcaption
- || cmd_id == CM_setfilename
- || cmd_id == CM_exdent)
+ if (cmd == CM_titlefont
+ || cmd == CM_insertcopying
+ || cmd == CM_sp
+ || cmd == CM_verbatiminclude
+ || cmd == CM_page
+ || cmd == CM_item
+ || cmd == CM_itemx
+ || cmd == CM_tab
+ || cmd == CM_headitem
+ || cmd == CM_printindex
+ || cmd == CM_listoffloats
+ || cmd == CM_center
+ || cmd == CM_dircategory
+ || cmd == CM_contents
+ || cmd == CM_shortcontents
+ || cmd == CM_summarycontents
+ || cmd == CM_caption
+ || cmd == CM_shortcaption
+ || cmd == CM_setfilename
+ || cmd == CM_exdent)
return 1;
/* headings Common.pm:954 */
- if ((command_data(cmd_id).flags & CF_sectioning)
- && !(command_data(cmd_id).flags & CF_root))
+ if ((command_data(cmd).flags & CF_sectioning)
+ && !(command_data(cmd).flags & CF_root))
return 1;
/* def commands 866 */
- if ((command_data(cmd_id).flags & CF_def))
+ if ((command_data(cmd).flags & CF_def))
return 1;
return 0;
Modified: trunk/tp/parsetexi/end_line.c
===================================================================
--- trunk/tp/parsetexi/end_line.c 2016-05-29 13:30:10 UTC (rev 7195)
+++ trunk/tp/parsetexi/end_line.c 2016-05-29 14:53:07 UTC (rev 7196)
@@ -2029,7 +2029,39 @@
{
current = end_line_misc_line (current);
}
+ /* 3419 */
+ else if (current->contents.number == 1
+ && current->contents.list[0]->type == ET_empty_line_after_command
+ || current->contents.number == 2
+ && current->contents.list[0]->type == ET_empty_line_after_command
+ && (current->contents.list[1]->cmd == CM_c
+ || current->contents.list[1]->cmd == CM_comment))
+ {
+ if (current->type == ET_preformatted
+ || current->type == ET_rawpreformatted)
+ {
+ /* Empty line after a @menu, or before a preformatted. Reparent
+ to the menu or other format. */
+ ELEMENT *parent, *to_reparent;
+ parent = current->parent;
+ if (parent->type == ET_menu_comment
+ && parent->contents.number == 1)
+ {
+ parent = parent->parent;
+ }
+ to_reparent = pop_element_from_contents (parent);
+ debug ("LINE AFTER COMMAND IN PREFORMATTED");
+ while (current->contents.number > 0)
+ {
+ ELEMENT *e;
+ e = remove_from_contents (current, 0);
+ add_to_element_contents (parent, e);
+ }
+ add_to_element_contents (parent, to_reparent);
+ }
+ }
+
/* 'line' or 'def' at top of "context stack" - this happens when
line commands are nested (always incorrectly?) */
if (current_context () == ct_line || current_context () == ct_def)
@@ -2052,7 +2084,7 @@
}
}
- /* 2471 Check for infinite loop bugs */
+ /* 3470 Check for infinite loop bugs */
if (current == current_old)
abort ();
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [7196] parsetexi update,
gavinsmith0123 <=