footnote_not_closed.pl 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. use vars qw(%result_texis %result_texts %result_trees %result_errors
  2. %result_indices %result_sectioning %result_nodes %result_menus
  3. %result_floats %result_converted %result_converted_errors
  4. %result_elements %result_directions_text);
  5. use utf8;
  6. $result_trees{'footnote_not_closed'} = {
  7. 'contents' => [
  8. {
  9. 'contents' => [
  10. {
  11. 'parent' => {},
  12. 'text' => 'AAA'
  13. },
  14. {
  15. 'args' => [
  16. {
  17. 'contents' => [
  18. {
  19. 'parent' => {},
  20. 'text' => ' ',
  21. 'type' => 'empty_spaces_before_argument'
  22. },
  23. {
  24. 'contents' => [
  25. {
  26. 'parent' => {},
  27. 'text' => 'in footnote
  28. '
  29. }
  30. ],
  31. 'parent' => {},
  32. 'type' => 'paragraph'
  33. },
  34. {
  35. 'parent' => {},
  36. 'text' => '
  37. ',
  38. 'type' => 'empty_line'
  39. },
  40. {
  41. 'contents' => [
  42. {
  43. 'parent' => {},
  44. 'text' => 'Second paragraph.
  45. '
  46. }
  47. ],
  48. 'parent' => {},
  49. 'type' => 'paragraph'
  50. }
  51. ],
  52. 'parent' => {},
  53. 'type' => 'brace_command_context'
  54. }
  55. ],
  56. 'cmdname' => 'footnote',
  57. 'contents' => [],
  58. 'extra' => {
  59. 'spaces_before_argument' => {}
  60. },
  61. 'line_nr' => {
  62. 'file_name' => '',
  63. 'line_nr' => 1,
  64. 'macro' => ''
  65. },
  66. 'parent' => {}
  67. }
  68. ],
  69. 'parent' => {},
  70. 'type' => 'paragraph'
  71. }
  72. ],
  73. 'type' => 'text_root'
  74. };
  75. $result_trees{'footnote_not_closed'}{'contents'}[0]{'contents'}[0]{'parent'} = $result_trees{'footnote_not_closed'}{'contents'}[0];
  76. $result_trees{'footnote_not_closed'}{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'}[0]{'parent'} = $result_trees{'footnote_not_closed'}{'contents'}[0]{'contents'}[1]{'args'}[0];
  77. $result_trees{'footnote_not_closed'}{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'}[1]{'contents'}[0]{'parent'} = $result_trees{'footnote_not_closed'}{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'}[1];
  78. $result_trees{'footnote_not_closed'}{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'}[1]{'parent'} = $result_trees{'footnote_not_closed'}{'contents'}[0]{'contents'}[1]{'args'}[0];
  79. $result_trees{'footnote_not_closed'}{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'}[2]{'parent'} = $result_trees{'footnote_not_closed'}{'contents'}[0]{'contents'}[1]{'args'}[0];
  80. $result_trees{'footnote_not_closed'}{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'}[3]{'contents'}[0]{'parent'} = $result_trees{'footnote_not_closed'}{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'}[3];
  81. $result_trees{'footnote_not_closed'}{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'}[3]{'parent'} = $result_trees{'footnote_not_closed'}{'contents'}[0]{'contents'}[1]{'args'}[0];
  82. $result_trees{'footnote_not_closed'}{'contents'}[0]{'contents'}[1]{'args'}[0]{'parent'} = $result_trees{'footnote_not_closed'}{'contents'}[0]{'contents'}[1];
  83. $result_trees{'footnote_not_closed'}{'contents'}[0]{'contents'}[1]{'extra'}{'spaces_before_argument'} = $result_trees{'footnote_not_closed'}{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'}[0];
  84. $result_trees{'footnote_not_closed'}{'contents'}[0]{'contents'}[1]{'parent'} = $result_trees{'footnote_not_closed'}{'contents'}[0];
  85. $result_trees{'footnote_not_closed'}{'contents'}[0]{'parent'} = $result_trees{'footnote_not_closed'};
  86. $result_texis{'footnote_not_closed'} = 'AAA@footnote{ in footnote
  87. Second paragraph.
  88. }';
  89. $result_texts{'footnote_not_closed'} = 'AAA';
  90. $result_errors{'footnote_not_closed'} = [
  91. {
  92. 'error_line' => ':1: @footnote missing closing brace
  93. ',
  94. 'file_name' => '',
  95. 'line_nr' => 1,
  96. 'macro' => '',
  97. 'text' => '@footnote missing closing brace',
  98. 'type' => 'error'
  99. }
  100. ];
  101. 1;