leading_spaces_no_ignore.pl 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  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{'leading_spaces_no_ignore'} = {
  7. 'contents' => [
  8. {
  9. 'args' => [
  10. {
  11. 'parent' => {},
  12. 'text' => 'mymacro',
  13. 'type' => 'macro_name'
  14. }
  15. ],
  16. 'cmdname' => 'macro',
  17. 'contents' => [
  18. {
  19. 'parent' => {},
  20. 'text' => ' Some here
  21. ',
  22. 'type' => 'raw'
  23. },
  24. {
  25. 'parent' => {},
  26. 'text' => ' text',
  27. 'type' => 'raw'
  28. },
  29. {
  30. 'parent' => {},
  31. 'text' => '
  32. ',
  33. 'type' => 'last_raw_newline'
  34. }
  35. ],
  36. 'extra' => {
  37. 'arg_line' => ' mymacro
  38. '
  39. },
  40. 'line_nr' => {
  41. 'file_name' => '',
  42. 'line_nr' => 1,
  43. 'macro' => ''
  44. },
  45. 'parent' => {}
  46. },
  47. {
  48. 'extra' => {
  49. 'command' => {}
  50. },
  51. 'parent' => {},
  52. 'text' => '
  53. ',
  54. 'type' => 'empty_line_after_command'
  55. },
  56. {
  57. 'parent' => {},
  58. 'text' => '
  59. ',
  60. 'type' => 'empty_line'
  61. },
  62. {
  63. 'parent' => {},
  64. 'text' => ' ',
  65. 'type' => 'empty_spaces_before_paragraph'
  66. },
  67. {
  68. 'contents' => [
  69. {
  70. 'parent' => {},
  71. 'text' => 'Some here
  72. '
  73. },
  74. {
  75. 'parent' => {},
  76. 'text' => ' text
  77. '
  78. }
  79. ],
  80. 'parent' => {},
  81. 'type' => 'paragraph'
  82. }
  83. ],
  84. 'type' => 'text_root'
  85. };
  86. $result_trees{'leading_spaces_no_ignore'}{'contents'}[0]{'args'}[0]{'parent'} = $result_trees{'leading_spaces_no_ignore'}{'contents'}[0];
  87. $result_trees{'leading_spaces_no_ignore'}{'contents'}[0]{'contents'}[0]{'parent'} = $result_trees{'leading_spaces_no_ignore'}{'contents'}[0];
  88. $result_trees{'leading_spaces_no_ignore'}{'contents'}[0]{'contents'}[1]{'parent'} = $result_trees{'leading_spaces_no_ignore'}{'contents'}[0];
  89. $result_trees{'leading_spaces_no_ignore'}{'contents'}[0]{'contents'}[2]{'parent'} = $result_trees{'leading_spaces_no_ignore'}{'contents'}[0];
  90. $result_trees{'leading_spaces_no_ignore'}{'contents'}[0]{'parent'} = $result_trees{'leading_spaces_no_ignore'};
  91. $result_trees{'leading_spaces_no_ignore'}{'contents'}[1]{'extra'}{'command'} = $result_trees{'leading_spaces_no_ignore'}{'contents'}[0];
  92. $result_trees{'leading_spaces_no_ignore'}{'contents'}[1]{'parent'} = $result_trees{'leading_spaces_no_ignore'};
  93. $result_trees{'leading_spaces_no_ignore'}{'contents'}[2]{'parent'} = $result_trees{'leading_spaces_no_ignore'};
  94. $result_trees{'leading_spaces_no_ignore'}{'contents'}[3]{'parent'} = $result_trees{'leading_spaces_no_ignore'};
  95. $result_trees{'leading_spaces_no_ignore'}{'contents'}[4]{'contents'}[0]{'parent'} = $result_trees{'leading_spaces_no_ignore'}{'contents'}[4];
  96. $result_trees{'leading_spaces_no_ignore'}{'contents'}[4]{'contents'}[1]{'parent'} = $result_trees{'leading_spaces_no_ignore'}{'contents'}[4];
  97. $result_trees{'leading_spaces_no_ignore'}{'contents'}[4]{'parent'} = $result_trees{'leading_spaces_no_ignore'};
  98. $result_texis{'leading_spaces_no_ignore'} = '@macro mymacro
  99. Some here
  100. text
  101. @end macro
  102. Some here
  103. text
  104. ';
  105. $result_texts{'leading_spaces_no_ignore'} = '
  106. Some here
  107. text
  108. ';
  109. $result_errors{'leading_spaces_no_ignore'} = [];
  110. 1;