rsyntaxtree 1.2.3 → 1.2.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (139) hide show
  1. checksums.yaml +4 -4
  2. data/.tags +364 -127
  3. data/Rakefile +3 -0
  4. data/bin/rsyntaxtree +2 -0
  5. data/docs/_examples/000.md +2 -1
  6. data/docs/_examples/001.md +1 -0
  7. data/docs/_examples/002.md +1 -0
  8. data/docs/_examples/003.md +1 -0
  9. data/docs/_examples/004.md +1 -0
  10. data/docs/_examples/005.md +1 -0
  11. data/docs/_examples/006.md +1 -0
  12. data/docs/_examples/007.md +1 -0
  13. data/docs/_examples/008.md +1 -0
  14. data/docs/_examples/009.md +1 -0
  15. data/docs/_examples/010.md +1 -0
  16. data/docs/_examples/011.md +1 -0
  17. data/docs/_examples/012.md +1 -0
  18. data/docs/_examples/013.md +1 -0
  19. data/docs/_examples/014.md +1 -0
  20. data/docs/_examples/015.md +1 -0
  21. data/docs/_examples/016.md +1 -0
  22. data/docs/_examples/017.md +1 -0
  23. data/docs/_examples/018.md +1 -0
  24. data/docs/_examples/019.md +1 -0
  25. data/docs/_examples/020.md +7 -6
  26. data/docs/_examples/021.md +1 -0
  27. data/docs/_examples/022.md +1 -0
  28. data/docs/_examples/023.md +1 -0
  29. data/docs/_examples/024.md +1 -0
  30. data/docs/_examples/025.md +1 -0
  31. data/docs/_examples/026.md +1 -0
  32. data/docs/_examples/027.md +1 -0
  33. data/docs/_examples/028.md +1 -0
  34. data/docs/_examples/029.md +1 -0
  35. data/docs/_examples/030.md +1 -0
  36. data/docs/_examples/031.md +1 -0
  37. data/docs/_examples/032.md +1 -0
  38. data/docs/_examples/033.md +1 -0
  39. data/docs/_examples/034.md +1 -0
  40. data/docs/_examples/035.md +1 -0
  41. data/docs/_examples/036.md +1 -0
  42. data/docs/_examples/037.md +1 -0
  43. data/docs/_examples/038.md +2 -1
  44. data/docs/_examples/039.md +2 -0
  45. data/docs/_examples/040.md +62 -0
  46. data/docs/_examples/041.md +34 -0
  47. data/docs/assets/img/000.png +0 -0
  48. data/docs/assets/img/001.png +0 -0
  49. data/docs/assets/img/002.png +0 -0
  50. data/docs/assets/img/003.png +0 -0
  51. data/docs/assets/img/004.png +0 -0
  52. data/docs/assets/img/005.png +0 -0
  53. data/docs/assets/img/006.png +0 -0
  54. data/docs/assets/img/007.png +0 -0
  55. data/docs/assets/img/008.png +0 -0
  56. data/docs/assets/img/009.png +0 -0
  57. data/docs/assets/img/010.png +0 -0
  58. data/docs/assets/img/011.png +0 -0
  59. data/docs/assets/img/012.png +0 -0
  60. data/docs/assets/img/013.png +0 -0
  61. data/docs/assets/img/014.png +0 -0
  62. data/docs/assets/img/015.png +0 -0
  63. data/docs/assets/img/016.png +0 -0
  64. data/docs/assets/img/017.png +0 -0
  65. data/docs/assets/img/018.png +0 -0
  66. data/docs/assets/img/019.png +0 -0
  67. data/docs/assets/img/020.png +0 -0
  68. data/docs/assets/img/021.png +0 -0
  69. data/docs/assets/img/022.png +0 -0
  70. data/docs/assets/img/023.png +0 -0
  71. data/docs/assets/img/024.png +0 -0
  72. data/docs/assets/img/025.png +0 -0
  73. data/docs/assets/img/026.png +0 -0
  74. data/docs/assets/img/027.png +0 -0
  75. data/docs/assets/img/028.png +0 -0
  76. data/docs/assets/img/029.png +0 -0
  77. data/docs/assets/img/030.png +0 -0
  78. data/docs/assets/img/031.png +0 -0
  79. data/docs/assets/img/032.png +0 -0
  80. data/docs/assets/img/033.png +0 -0
  81. data/docs/assets/img/034.png +0 -0
  82. data/docs/assets/img/035.png +0 -0
  83. data/docs/assets/img/036.png +0 -0
  84. data/docs/assets/img/037.png +0 -0
  85. data/docs/assets/img/038.png +0 -0
  86. data/docs/assets/img/040.png +0 -0
  87. data/docs/assets/img/041.png +0 -0
  88. data/docs/assets/svg/000.svg +43 -43
  89. data/docs/assets/svg/001.svg +14 -14
  90. data/docs/assets/svg/002.svg +19 -19
  91. data/docs/assets/svg/003.svg +16 -16
  92. data/docs/assets/svg/004.svg +18 -18
  93. data/docs/assets/svg/005.svg +11 -11
  94. data/docs/assets/svg/006.svg +13 -13
  95. data/docs/assets/svg/007.svg +15 -15
  96. data/docs/assets/svg/008.svg +19 -19
  97. data/docs/assets/svg/009.svg +17 -17
  98. data/docs/assets/svg/010.svg +32 -32
  99. data/docs/assets/svg/011.svg +15 -15
  100. data/docs/assets/svg/012.svg +16 -16
  101. data/docs/assets/svg/013.svg +140 -140
  102. data/docs/assets/svg/014.svg +102 -109
  103. data/docs/assets/svg/015.svg +21 -21
  104. data/docs/assets/svg/016.svg +144 -144
  105. data/docs/assets/svg/017.svg +22 -22
  106. data/docs/assets/svg/018.svg +25 -25
  107. data/docs/assets/svg/019.svg +202 -232
  108. data/docs/assets/svg/020.svg +37 -35
  109. data/docs/assets/svg/021.svg +20 -20
  110. data/docs/assets/svg/022.svg +39 -39
  111. data/docs/assets/svg/023.svg +31 -31
  112. data/docs/assets/svg/024.svg +11 -11
  113. data/docs/assets/svg/025.svg +144 -144
  114. data/docs/assets/svg/026.svg +9 -9
  115. data/docs/assets/svg/027.svg +19 -19
  116. data/docs/assets/svg/028.svg +15 -15
  117. data/docs/assets/svg/029.svg +88 -98
  118. data/docs/assets/svg/030.svg +47 -53
  119. data/docs/assets/svg/031.svg +9 -9
  120. data/docs/assets/svg/032.svg +60 -66
  121. data/docs/assets/svg/033.svg +29 -29
  122. data/docs/assets/svg/034.svg +58 -67
  123. data/docs/assets/svg/035.svg +48 -53
  124. data/docs/assets/svg/036.svg +26 -29
  125. data/docs/assets/svg/037.svg +24 -25
  126. data/docs/assets/svg/038.svg +51 -57
  127. data/docs/assets/svg/039.svg +8 -8
  128. data/docs/assets/svg/040.svg +120 -0
  129. data/docs/assets/svg/041.svg +93 -0
  130. data/docs/documentation.md +7 -3
  131. data/docs/documentation_ja.md +7 -3
  132. data/docs/examples.html +2 -0
  133. data/lib/rsyntaxtree/base_graph.rb +7 -6
  134. data/lib/rsyntaxtree/element.rb +2 -0
  135. data/lib/rsyntaxtree/svg_graph.rb +51 -48
  136. data/lib/rsyntaxtree/version.rb +1 -1
  137. data/lib/rsyntaxtree.rb +5 -0
  138. data/test/example_verify_test.rb +1 -0
  139. metadata +9 -3
data/lib/rsyntaxtree.rb CHANGED
@@ -13,6 +13,8 @@ ETYPE_NODE = 1
13
13
  ETYPE_LEAF = 2
14
14
  SUBSCRIPT_CONST = 0.7
15
15
  FONT_SCALING = 2
16
+ LINE_SCALING = 2
17
+ BLINE_SCALING = 5
16
18
  WHITESPACE_BLOCK = "■"
17
19
 
18
20
  class RSTError < StandardError
@@ -66,6 +68,8 @@ module RSyntaxTree
66
68
  end
67
69
  when :fontsize
68
70
  new_params[key] = value.to_i * FONT_SCALING
71
+ when :linewidth
72
+ new_params[key] = value.to_i
69
73
  when :margin
70
74
  new_params[key] = value.to_i * FONT_SCALING * 5
71
75
  when :vheight
@@ -120,6 +124,7 @@ module RSyntaxTree
120
124
  color: "modern",
121
125
  transparent: false,
122
126
  fontsize: 16,
127
+ linewidth: 2,
123
128
  format: "png",
124
129
  leafstyle: "auto",
125
130
  filename: "syntree",
@@ -20,6 +20,7 @@ class ExampleParserTest < Minitest::Test
20
20
  leafstyle: "auto",
21
21
  fontstyle: "sans",
22
22
  fontsize: 16,
23
+ linewidth: 1,
23
24
  margin: 1,
24
25
  vheight: 2.0,
25
26
  color: "on",
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rsyntaxtree
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.3
4
+ version: 1.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yoichiro Hasebe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-02-03 00:00:00.000000000 Z
11
+ date: 2023-02-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: optimist
@@ -152,6 +152,8 @@ files:
152
152
  - docs/_examples/037.md
153
153
  - docs/_examples/038.md
154
154
  - docs/_examples/039.md
155
+ - docs/_examples/040.md
156
+ - docs/_examples/041.md
155
157
  - docs/_includes/box_and_circle_table.html
156
158
  - docs/_includes/escape_char_table.html
157
159
  - docs/_includes/social_media_links.html
@@ -197,6 +199,8 @@ files:
197
199
  - docs/assets/img/037.png
198
200
  - docs/assets/img/038.png
199
201
  - docs/assets/img/039.png
202
+ - docs/assets/img/040.png
203
+ - docs/assets/img/041.png
200
204
  - docs/assets/img/elements/circle.png
201
205
  - docs/assets/img/elements/circle_abc.png
202
206
  - docs/assets/img/elements/circle_bold.png
@@ -253,6 +257,8 @@ files:
253
257
  - docs/assets/svg/037.svg
254
258
  - docs/assets/svg/038.svg
255
259
  - docs/assets/svg/039.svg
260
+ - docs/assets/svg/040.svg
261
+ - docs/assets/svg/041.svg
256
262
  - docs/documentation.md
257
263
  - docs/documentation_ja.md
258
264
  - docs/examples.html
@@ -310,7 +316,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
310
316
  - !ruby/object:Gem::Version
311
317
  version: '0'
312
318
  requirements: []
313
- rubygems_version: 3.4.1
319
+ rubygems_version: 3.4.2
314
320
  signing_key:
315
321
  specification_version: 4
316
322
  summary: RSyntaxTree is a graphical syntax tree generator written in Ruby