m2m_keygen 0.4.9 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (174) hide show
  1. checksums.yaml +4 -4
  2. data/.overcommit.yml +4 -7
  3. data/.rubocop.yml +19 -16
  4. data/.ruby-version +1 -1
  5. data/.streerc +1 -0
  6. data/.tool-versions +1 -1
  7. data/CHANGELOG.md +70 -1
  8. data/Gemfile +2 -2
  9. data/Gemfile.lock +135 -158
  10. data/README.md +64 -78
  11. data/docs/MIGRATING.md +69 -0
  12. data/docs/SPEC.md +245 -0
  13. data/examples/nonce_store/postgres.rb +40 -0
  14. data/examples/nonce_store/redis.rb +23 -0
  15. data/gemfiles/rack_2.gemfile +5 -0
  16. data/gemfiles/rack_3.gemfile +5 -0
  17. data/lib/m2m_keygen/canonicalizer.rb +57 -0
  18. data/lib/m2m_keygen/nonce_store/disabled.rb +19 -0
  19. data/lib/m2m_keygen/nonce_store/memory.rb +64 -0
  20. data/lib/m2m_keygen/nonce_store.rb +18 -0
  21. data/lib/m2m_keygen/rack_validator.rb +86 -19
  22. data/lib/m2m_keygen/request_signer/signed_request.rb +10 -0
  23. data/lib/m2m_keygen/request_signer.rb +118 -0
  24. data/lib/m2m_keygen/signature.rb +41 -39
  25. data/lib/m2m_keygen/types/params_type.rb +6 -17
  26. data/lib/m2m_keygen/version.rb +1 -1
  27. data/lib/m2m_keygen.rb +6 -0
  28. data/m2m_keygen.gemspec +12 -14
  29. data/sorbet/config +1 -0
  30. data/sorbet/rbi/gems/.gitattributes +1 -0
  31. data/sorbet/rbi/gems/{ast@2.4.2.rbi → ast@2.4.3.rbi} +45 -79
  32. data/sorbet/rbi/gems/{benchmark@0.2.0.rbi → benchmark@0.5.0.rbi} +91 -58
  33. data/sorbet/rbi/gems/bundler-audit@0.9.3.rbi +397 -0
  34. data/sorbet/rbi/gems/byebug@13.0.0.rbi +3651 -0
  35. data/sorbet/rbi/gems/childprocess@5.1.0.rbi +336 -0
  36. data/sorbet/rbi/gems/concurrent-ruby@1.3.7.rbi +384 -0
  37. data/sorbet/rbi/gems/{diff-lcs@1.5.0.rbi → diff-lcs@1.6.2.rbi} +189 -199
  38. data/sorbet/rbi/gems/{docile@1.4.0.rbi → docile@1.4.1.rbi} +147 -147
  39. data/sorbet/rbi/gems/dotenv@3.2.0.rbi +267 -0
  40. data/sorbet/rbi/gems/erubi@1.13.1.rbi +155 -0
  41. data/sorbet/rbi/gems/{faker@2.22.0.rbi → faker@3.8.0.rbi} +8468 -3829
  42. data/sorbet/rbi/gems/{ffi@1.15.5.rbi → ffi@1.17.4.rbi} +1 -0
  43. data/sorbet/rbi/gems/{formatador@1.1.0.rbi → formatador@1.2.3.rbi} +1 -0
  44. data/sorbet/rbi/gems/{guard@2.18.0.rbi → guard@2.20.1.rbi} +1 -0
  45. data/sorbet/rbi/gems/{i18n@1.12.0.rbi → i18n@1.15.2.rbi} +687 -827
  46. data/sorbet/rbi/gems/io-console@0.8.2.rbi +9 -0
  47. data/sorbet/rbi/gems/{json@2.6.2.rbi → json@2.20.0.rbi} +994 -252
  48. data/sorbet/rbi/gems/language_server-protocol@3.17.0.5.rbi +9 -0
  49. data/sorbet/rbi/gems/lint_roller@1.1.0.rbi +189 -0
  50. data/sorbet/rbi/gems/listen@3.10.0.rbi +9 -0
  51. data/sorbet/rbi/gems/logger@1.7.0.rbi +896 -0
  52. data/sorbet/rbi/gems/{lumberjack@1.2.8.rbi → lumberjack@1.4.2.rbi} +1 -0
  53. data/sorbet/rbi/gems/{method_source@1.0.0.rbi → method_source@1.1.0.rbi} +111 -90
  54. data/sorbet/rbi/gems/{overcommit@0.59.1.rbi → overcommit@0.71.0.rbi} +503 -647
  55. data/sorbet/rbi/gems/parallel@2.1.0.rbi +321 -0
  56. data/sorbet/rbi/gems/parser@3.3.11.1.rbi +5229 -0
  57. data/sorbet/rbi/gems/prettier_print@1.2.1.rbi +878 -0
  58. data/sorbet/rbi/gems/prism@1.9.0.rbi +42224 -0
  59. data/sorbet/rbi/gems/pry-byebug@3.12.0.rbi +481 -0
  60. data/sorbet/rbi/gems/{pry@0.14.1.rbi → pry@0.16.0.rbi} +2567 -3550
  61. data/sorbet/rbi/gems/{racc@1.6.0.rbi → racc@1.8.1.rbi} +54 -40
  62. data/sorbet/rbi/gems/rack@3.2.6.rbi +4653 -0
  63. data/sorbet/rbi/gems/{rake@13.0.6.rbi → rake@13.4.2.rbi} +963 -732
  64. data/sorbet/rbi/gems/{rb-inotify@0.10.1.rbi → rb-inotify@0.11.1.rbi} +1 -0
  65. data/sorbet/rbi/gems/rbi@0.3.14.rbi +5519 -0
  66. data/sorbet/rbi/gems/rbs@4.0.3.rbi +6908 -0
  67. data/sorbet/rbi/gems/regexp_parser@2.12.0.rbi +3398 -0
  68. data/sorbet/rbi/gems/reline@0.6.3.rbi +2446 -0
  69. data/sorbet/rbi/gems/require-hooks@0.4.0.rbi +152 -0
  70. data/sorbet/rbi/gems/{rexml@3.2.5.rbi → rexml@3.4.4.rbi} +1085 -894
  71. data/sorbet/rbi/gems/rspec-core@3.13.6.rbi +9475 -0
  72. data/sorbet/rbi/gems/rspec-expectations@3.13.5.rbi +6108 -0
  73. data/sorbet/rbi/gems/rspec-mocks@3.13.8.rbi +4787 -0
  74. data/sorbet/rbi/gems/rspec-support@3.13.7.rbi +1274 -0
  75. data/sorbet/rbi/gems/rspec@3.13.2.rbi +15 -0
  76. data/sorbet/rbi/gems/rspec_in_context@1.2.2.rbi +294 -0
  77. data/sorbet/rbi/gems/rubocop-ast@1.49.1.rbi +7140 -0
  78. data/sorbet/rbi/gems/rubocop-faker@1.3.0.rbi +88 -0
  79. data/sorbet/rbi/gems/rubocop-performance@1.26.1.rbi +3403 -0
  80. data/sorbet/rbi/gems/rubocop-sorbet@0.12.0.rbi +2448 -0
  81. data/sorbet/rbi/gems/rubocop@1.88.1.rbi +63103 -0
  82. data/sorbet/rbi/gems/ruby-lsp@0.26.9.rbi +28 -0
  83. data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +988 -0
  84. data/sorbet/rbi/gems/rubydex@0.2.7.rbi +836 -0
  85. data/sorbet/rbi/gems/simplecov-html@0.13.2.rbi +90 -0
  86. data/sorbet/rbi/gems/{simplecov@0.21.2.rbi → simplecov@0.22.0.rbi} +438 -578
  87. data/sorbet/rbi/gems/spoom@1.8.2.rbi +6691 -0
  88. data/sorbet/rbi/gems/syntax_tree@6.3.0.rbi +22090 -0
  89. data/sorbet/rbi/gems/tapioca@0.19.2.rbi +3597 -0
  90. data/sorbet/rbi/gems/{thor@1.2.1.rbi → thor@1.5.0.rbi} +1085 -1171
  91. data/sorbet/rbi/gems/tsort@0.2.0.rbi +389 -0
  92. data/sorbet/rbi/gems/unicode-display_width@3.2.0.rbi +130 -0
  93. data/sorbet/rbi/gems/unicode-emoji@4.2.0.rbi +332 -0
  94. data/sorbet/rbi/gems/{yard-sorbet@0.7.0.rbi → yard-sorbet@0.9.0.rbi} +142 -99
  95. data/sorbet/rbi/gems/{yard@0.9.28.rbi → yard@0.9.44.rbi} +5350 -6316
  96. data/sorbet/rbi/gems/zeitwerk@2.8.2.rbi +1178 -0
  97. metadata +105 -111
  98. data/.prettierrc.js +0 -4
  99. data/docs/M2mKeygen/Error.html +0 -135
  100. data/docs/M2mKeygen/ParamsEncoder.html +0 -321
  101. data/docs/M2mKeygen/RackValidator.html +0 -533
  102. data/docs/M2mKeygen/Signature.html +0 -680
  103. data/docs/M2mKeygen/Types.html +0 -147
  104. data/docs/M2mKeygen.html +0 -157
  105. data/docs/_index.html +0 -182
  106. data/docs/class_list.html +0 -51
  107. data/docs/css/common.css +0 -1
  108. data/docs/css/full_list.css +0 -58
  109. data/docs/css/style.css +0 -497
  110. data/docs/file.README.html +0 -230
  111. data/docs/file_list.html +0 -56
  112. data/docs/frames.html +0 -17
  113. data/docs/index.html +0 -230
  114. data/docs/js/app.js +0 -314
  115. data/docs/js/full_list.js +0 -216
  116. data/docs/js/jquery.js +0 -4
  117. data/docs/method_list.html +0 -139
  118. data/docs/top-level-namespace.html +0 -110
  119. data/lib/m2m_keygen/params_encoder.rb +0 -56
  120. data/package.json +0 -12
  121. data/sig/m2m_keygen.rbs +0 -4
  122. data/sorbet/rbi/gems/activesupport@7.0.3.1.rbi +0 -18608
  123. data/sorbet/rbi/gems/backport@1.2.0.rbi +0 -522
  124. data/sorbet/rbi/gems/bundler-audit@0.9.1.rbi +0 -308
  125. data/sorbet/rbi/gems/byebug@11.1.3.rbi +0 -3603
  126. data/sorbet/rbi/gems/childprocess@4.1.0.rbi +0 -401
  127. data/sorbet/rbi/gems/concurrent-ruby@1.1.10.rbi +0 -11581
  128. data/sorbet/rbi/gems/dotenv@2.8.1.rbi +0 -234
  129. data/sorbet/rbi/gems/e2mmap@0.1.0.rbi +0 -8
  130. data/sorbet/rbi/gems/haml@5.2.2.rbi +0 -3190
  131. data/sorbet/rbi/gems/jaro_winkler@1.5.4.rbi +0 -19
  132. data/sorbet/rbi/gems/kramdown-parser-gfm@1.1.0.rbi +0 -133
  133. data/sorbet/rbi/gems/kramdown@2.4.0.rbi +0 -3261
  134. data/sorbet/rbi/gems/listen@3.7.1.rbi +0 -1181
  135. data/sorbet/rbi/gems/minitest@5.16.3.rbi +0 -1459
  136. data/sorbet/rbi/gems/nokogiri@1.13.8.rbi +0 -6514
  137. data/sorbet/rbi/gems/parallel@1.22.1.rbi +0 -277
  138. data/sorbet/rbi/gems/parser@3.1.2.1.rbi +0 -6826
  139. data/sorbet/rbi/gems/prettier@3.2.0.rbi +0 -22
  140. data/sorbet/rbi/gems/prettier_print@0.1.0.rbi +0 -8
  141. data/sorbet/rbi/gems/pry-byebug@3.10.1.rbi +0 -1222
  142. data/sorbet/rbi/gems/rack@2.2.4.rbi +0 -5630
  143. data/sorbet/rbi/gems/rbi@0.0.15.rbi +0 -3007
  144. data/sorbet/rbi/gems/rbs@2.6.0.rbi +0 -8
  145. data/sorbet/rbi/gems/regexp_parser@2.5.0.rbi +0 -3366
  146. data/sorbet/rbi/gems/reverse_markdown@2.1.1.rbi +0 -389
  147. data/sorbet/rbi/gems/rspec-core@3.11.0.rbi +0 -10786
  148. data/sorbet/rbi/gems/rspec-expectations@3.11.0.rbi +0 -8170
  149. data/sorbet/rbi/gems/rspec-mocks@3.11.1.rbi +0 -5385
  150. data/sorbet/rbi/gems/rspec-support@3.11.0.rbi +0 -1746
  151. data/sorbet/rbi/gems/rspec@3.11.0.rbi +0 -187
  152. data/sorbet/rbi/gems/rspec_in_context@1.1.0.3.rbi +0 -1113
  153. data/sorbet/rbi/gems/rubocop-ast@1.21.0.rbi +0 -7044
  154. data/sorbet/rbi/gems/rubocop-faker@1.1.0.rbi +0 -106
  155. data/sorbet/rbi/gems/rubocop-performance@1.14.3.rbi +0 -2982
  156. data/sorbet/rbi/gems/rubocop-sorbet@0.6.11.rbi +0 -990
  157. data/sorbet/rbi/gems/rubocop@1.35.1.rbi +0 -52002
  158. data/sorbet/rbi/gems/ruby-progressbar@1.11.0.rbi +0 -1239
  159. data/sorbet/rbi/gems/simplecov-html@0.12.3.rbi +0 -219
  160. data/sorbet/rbi/gems/solargraph@0.46.0.rbi +0 -9075
  161. data/sorbet/rbi/gems/spoom@1.1.12.rbi +0 -2369
  162. data/sorbet/rbi/gems/syntax_tree-haml@1.3.1.rbi +0 -8
  163. data/sorbet/rbi/gems/syntax_tree-rbs@0.5.0.rbi +0 -8
  164. data/sorbet/rbi/gems/syntax_tree@3.5.0.rbi +0 -8
  165. data/sorbet/rbi/gems/tapioca@0.9.4.rbi +0 -2946
  166. data/sorbet/rbi/gems/temple@0.8.2.rbi +0 -1712
  167. data/sorbet/rbi/gems/tilt@2.0.11.rbi +0 -742
  168. data/sorbet/rbi/gems/tzinfo@2.0.5.rbi +0 -5914
  169. data/sorbet/rbi/gems/unicode-display_width@2.2.0.rbi +0 -48
  170. data/sorbet/rbi/gems/unparser@0.6.5.rbi +0 -4529
  171. data/sorbet/rbi/gems/webrick@1.7.0.rbi +0 -2553
  172. data/sorbet/rbi/gems/zeitwerk@2.6.0.rbi +0 -867
  173. data/sorbet/rbi/manual.rbi +0 -7
  174. data/yarn.lock +0 -20
@@ -1,3261 +0,0 @@
1
- # typed: true
2
-
3
- # DO NOT EDIT MANUALLY
4
- # This is an autogenerated file for types exported from the `kramdown` gem.
5
- # Please instead update this file by running `bin/tapioca gem kramdown`.
6
-
7
- # source://kramdown-2.4.0/lib/kramdown/version.rb:10
8
- module Kramdown
9
- class << self
10
- # Return the data directory for kramdown.
11
- #
12
- # source://kramdown-2.4.0/lib/kramdown/document.rb:49
13
- def data_dir; end
14
- end
15
- end
16
-
17
- # This module contains all available converters, i.e. classes that take a root Element and convert
18
- # it to a specific output format. The result is normally a string. For example, the
19
- # Converter::Html module converts an element tree into valid HTML.
20
- #
21
- # Converters use the Base class for common functionality (like applying a template to the output)
22
- # \- see its API documentation for how to create a custom converter class.
23
- #
24
- # source://kramdown-2.4.0/lib/kramdown/converter.rb:20
25
- module Kramdown::Converter
26
- extend ::Kramdown::Utils::Configurable
27
-
28
- class << self
29
- # source://kramdown-2.4.0/lib/kramdown/utils/configurable.rb:37
30
- def add_math_engine(data, *args, &block); end
31
-
32
- # source://kramdown-2.4.0/lib/kramdown/utils/configurable.rb:37
33
- def add_syntax_highlighter(data, *args, &block); end
34
-
35
- # source://kramdown-2.4.0/lib/kramdown/utils/configurable.rb:30
36
- def configurables; end
37
-
38
- # source://kramdown-2.4.0/lib/kramdown/utils/configurable.rb:34
39
- def math_engine(data); end
40
-
41
- # source://kramdown-2.4.0/lib/kramdown/utils/configurable.rb:34
42
- def syntax_highlighter(data); end
43
- end
44
- end
45
-
46
- # == \Base class for converters
47
- #
48
- # This class serves as base class for all converters. It provides methods that can/should be
49
- # used by all converters (like #generate_id) as well as common functionality that is
50
- # automatically applied to the result (for example, embedding the output into a template).
51
- #
52
- # A converter object is used as a throw-away object, i.e. it is only used for storing the needed
53
- # state information during conversion. Therefore one can't instantiate a converter object
54
- # directly but only use the Base::convert method.
55
- #
56
- # == Implementing a converter
57
- #
58
- # Implementing a new converter is rather easy: just derive a new class from this class and put
59
- # it in the Kramdown::Converter module (the latter is only needed if auto-detection should work
60
- # properly). Then you need to implement the #convert method which has to contain the conversion
61
- # code for converting an element and has to return the conversion result.
62
- #
63
- # The actual transformation of the document tree can be done in any way. However, writing one
64
- # method per element type is a straight forward way to do it - this is how the Html and Latex
65
- # converters do the transformation.
66
- #
67
- # Have a look at the Base::convert method for additional information!
68
- #
69
- # source://kramdown-2.4.0/lib/kramdown/converter/base.rb:40
70
- class Kramdown::Converter::Base
71
- # Initialize the converter with the given +root+ element and +options+ hash.
72
- #
73
- # @return [Base] a new instance of Base
74
- #
75
- # source://kramdown-2.4.0/lib/kramdown/converter/base.rb:55
76
- def initialize(root, options); end
77
-
78
- # Returns whether the template should be applied after the conversion of the tree.
79
- #
80
- # Defaults to true.
81
- #
82
- # @return [Boolean]
83
- #
84
- # source://kramdown-2.4.0/lib/kramdown/converter/base.rb:73
85
- def apply_template_after?; end
86
-
87
- # Returns whether the template should be applied before the conversion of the tree.
88
- #
89
- # Defaults to false.
90
- #
91
- # @return [Boolean]
92
- #
93
- # source://kramdown-2.4.0/lib/kramdown/converter/base.rb:66
94
- def apply_template_before?; end
95
-
96
- # The basic version of the ID generator, without any special provisions for empty or unique
97
- # IDs.
98
- #
99
- # source://kramdown-2.4.0/lib/kramdown/converter/base.rb:237
100
- def basic_generate_id(str); end
101
-
102
- # Convert the element +el+ and return the resulting object.
103
- #
104
- # This is the only method that has to be implemented by sub-classes!
105
- #
106
- # @raise [NotImplementedError]
107
- #
108
- # source://kramdown-2.4.0/lib/kramdown/converter/base.rb:122
109
- def convert(_el); end
110
-
111
- # Can be used by a converter for storing arbitrary information during the conversion process.
112
- #
113
- # source://kramdown-2.4.0/lib/kramdown/converter/base.rb:43
114
- def data; end
115
-
116
- # Extract the code block/span language from the attributes.
117
- #
118
- # source://kramdown-2.4.0/lib/kramdown/converter/base.rb:174
119
- def extract_code_language(attr); end
120
-
121
- # See #extract_code_language
122
- #
123
- # *Warning*: This version will modify the given attributes if a language is present.
124
- #
125
- # source://kramdown-2.4.0/lib/kramdown/converter/base.rb:183
126
- def extract_code_language!(attr); end
127
-
128
- # Format the given math element with the math engine configured through the option
129
- # 'math_engine'.
130
- #
131
- # source://kramdown-2.4.0/lib/kramdown/converter/base.rb:206
132
- def format_math(el, opts = T.unsafe(nil)); end
133
-
134
- # Generate an unique alpha-numeric ID from the the string +str+ for use as a header ID.
135
- #
136
- # Uses the option +auto_id_prefix+: the value of this option is prepended to every generated
137
- # ID.
138
- #
139
- # source://kramdown-2.4.0/lib/kramdown/converter/base.rb:222
140
- def generate_id(str); end
141
-
142
- # Highlight the given +text+ in the language +lang+ with the syntax highlighter configured
143
- # through the option 'syntax_highlighter'.
144
- #
145
- # source://kramdown-2.4.0/lib/kramdown/converter/base.rb:192
146
- def highlight_code(text, lang, type, opts = T.unsafe(nil)); end
147
-
148
- # Return +true+ if the header element +el+ should be used for the table of contents (as
149
- # specified by the +toc_levels+ option).
150
- #
151
- # @return [Boolean]
152
- #
153
- # source://kramdown-2.4.0/lib/kramdown/converter/base.rb:162
154
- def in_toc?(el); end
155
-
156
- # The hash with the conversion options.
157
- #
158
- # source://kramdown-2.4.0/lib/kramdown/converter/base.rb:46
159
- def options; end
160
-
161
- # Return the output header level given a level.
162
- #
163
- # Uses the +header_offset+ option for adjusting the header level.
164
- #
165
- # source://kramdown-2.4.0/lib/kramdown/converter/base.rb:169
166
- def output_header_level(level); end
167
-
168
- # The root element that is converted.
169
- #
170
- # source://kramdown-2.4.0/lib/kramdown/converter/base.rb:49
171
- def root; end
172
-
173
- # Return the entity that represents the given smart_quote element.
174
- #
175
- # source://kramdown-2.4.0/lib/kramdown/converter/base.rb:248
176
- def smart_quote_entity(el); end
177
-
178
- # Add the given warning +text+ to the warning array.
179
- #
180
- # source://kramdown-2.4.0/lib/kramdown/converter/base.rb:156
181
- def warning(text); end
182
-
183
- # The warnings array.
184
- #
185
- # source://kramdown-2.4.0/lib/kramdown/converter/base.rb:52
186
- def warnings; end
187
-
188
- class << self
189
- # Apply the +template+ using +body+ as the body string.
190
- #
191
- # The template is evaluated using ERB and the body is available in the @body instance variable
192
- # and the converter object in the @converter instance variable.
193
- #
194
- # source://kramdown-2.4.0/lib/kramdown/converter/base.rb:130
195
- def apply_template(converter, body); end
196
-
197
- # Convert the element tree +tree+ and return the resulting conversion object (normally a
198
- # string) and an array with warning messages. The parameter +options+ specifies the conversion
199
- # options that should be used.
200
- #
201
- # Initializes a new instance of the calling class and then calls the #convert method with
202
- # +tree+ as parameter.
203
- #
204
- # If the +template+ option is specified and non-empty, the template is evaluate with ERB
205
- # before and/or after the tree conversion depending on the result of #apply_template_before?
206
- # and #apply_template_after?. If the template is evaluated before, an empty string is used for
207
- # the body; if evaluated after, the result is used as body. See ::apply_template.
208
- #
209
- # The template resolution is done in the following way (for the converter ConverterName):
210
- #
211
- # 1. Look in the current working directory for the template.
212
- #
213
- # 2. Append +.converter_name+ (e.g. +.html+) to the template name and look for the resulting
214
- # file in the current working directory (the form +.convertername+ is deprecated).
215
- #
216
- # 3. Append +.converter_name+ to the template name and look for it in the kramdown data
217
- # directory (the form +.convertername+ is deprecated).
218
- #
219
- # 4. Check if the template name starts with 'string://' and if so, strip this prefix away and
220
- # use the rest as template.
221
- #
222
- # source://kramdown-2.4.0/lib/kramdown/converter/base.rb:101
223
- def convert(tree, options = T.unsafe(nil)); end
224
-
225
- # Return the template specified by +template+.
226
- #
227
- # source://kramdown-2.4.0/lib/kramdown/converter/base.rb:139
228
- def get_template(template); end
229
- end
230
- end
231
-
232
- # source://kramdown-2.4.0/lib/kramdown/converter/base.rb:245
233
- Kramdown::Converter::Base::SMART_QUOTE_INDICES = T.let(T.unsafe(nil), Hash)
234
-
235
- # Converts a Kramdown::Document to a nested hash for further processing or debug output.
236
- #
237
- # source://kramdown-2.4.0/lib/kramdown/converter/hash_ast.rb:19
238
- class Kramdown::Converter::HashAST < ::Kramdown::Converter::Base
239
- # source://kramdown-2.4.0/lib/kramdown/converter/hash_ast.rb:21
240
- def convert(el); end
241
- end
242
-
243
- # source://kramdown-2.4.0/lib/kramdown/converter/hash_ast.rb:35
244
- Kramdown::Converter::HashAst = Kramdown::Converter::HashAST
245
-
246
- # Converts a Kramdown::Document to HTML.
247
- #
248
- # You can customize the HTML converter by sub-classing it and overriding the +convert_NAME+
249
- # methods. Each such method takes the following parameters:
250
- #
251
- # [+el+] The element of type +NAME+ to be converted.
252
- #
253
- # [+indent+] A number representing the current amount of spaces for indent (only used for
254
- # block-level elements).
255
- #
256
- # The return value of such a method has to be a string containing the element +el+ formatted as
257
- # HTML element.
258
- #
259
- # source://kramdown-2.4.0/lib/kramdown/converter/html.rb:30
260
- class Kramdown::Converter::Html < ::Kramdown::Converter::Base
261
- include ::Kramdown::Utils::Html
262
- include ::Kramdown::Parser::Html::Constants
263
-
264
- # Initialize the HTML converter with the given Kramdown document +doc+.
265
- #
266
- # @return [Html] a new instance of Html
267
- #
268
- # source://kramdown-2.4.0/lib/kramdown/converter/html.rb:39
269
- def initialize(root, options); end
270
-
271
- # Add the syntax highlighter name to the 'class' attribute of the given attribute hash. And
272
- # overwrites or add a "language-LANG" part using the +lang+ parameter if +lang+ is not nil.
273
- #
274
- # source://kramdown-2.4.0/lib/kramdown/converter/html.rb:409
275
- def add_syntax_highlighter_to_class_attr(attr, lang = T.unsafe(nil)); end
276
-
277
- # Dispatch the conversion of the element +el+ to a +convert_TYPE+ method using the +type+ of
278
- # the element.
279
- #
280
- # source://kramdown-2.4.0/lib/kramdown/converter/html.rb:57
281
- def convert(el, indent = T.unsafe(nil)); end
282
-
283
- # source://kramdown-2.4.0/lib/kramdown/converter/html.rb:272
284
- def convert_a(el, indent); end
285
-
286
- # source://kramdown-2.4.0/lib/kramdown/converter/html.rb:365
287
- def convert_abbreviation(el, _indent); end
288
-
289
- # source://kramdown-2.4.0/lib/kramdown/converter/html.rb:77
290
- def convert_blank(_el, _indent); end
291
-
292
- # source://kramdown-2.4.0/lib/kramdown/converter/html.rb:141
293
- def convert_blockquote(el, indent); end
294
-
295
- # source://kramdown-2.4.0/lib/kramdown/converter/html.rb:268
296
- def convert_br(_el, _indent); end
297
-
298
- # source://kramdown-2.4.0/lib/kramdown/converter/html.rb:111
299
- def convert_codeblock(el, indent); end
300
-
301
- # source://kramdown-2.4.0/lib/kramdown/converter/html.rb:280
302
- def convert_codespan(el, _indent); end
303
-
304
- # source://kramdown-2.4.0/lib/kramdown/converter/html.rb:260
305
- def convert_comment(el, indent); end
306
-
307
- # source://kramdown-2.4.0/lib/kramdown/converter/html.rb:178
308
- def convert_dd(el, indent); end
309
-
310
- # source://kramdown-2.4.0/lib/kramdown/converter/html.rb:174
311
- def convert_dl(el, indent); end
312
-
313
- # source://kramdown-2.4.0/lib/kramdown/converter/html.rb:190
314
- def convert_dt(el, indent); end
315
-
316
- # source://kramdown-2.4.0/lib/kramdown/converter/html.rb:319
317
- def convert_em(el, indent); end
318
-
319
- # source://kramdown-2.4.0/lib/kramdown/converter/html.rb:324
320
- def convert_entity(el, _indent); end
321
-
322
- # source://kramdown-2.4.0/lib/kramdown/converter/html.rb:294
323
- def convert_footnote(el, _indent); end
324
-
325
- # source://kramdown-2.4.0/lib/kramdown/converter/html.rb:145
326
- def convert_header(el, indent); end
327
-
328
- # source://kramdown-2.4.0/lib/kramdown/converter/html.rb:155
329
- def convert_hr(el, indent); end
330
-
331
- # source://kramdown-2.4.0/lib/kramdown/converter/html.rb:201
332
- def convert_html_element(el, indent); end
333
-
334
- # source://kramdown-2.4.0/lib/kramdown/converter/html.rb:276
335
- def convert_img(el, _indent); end
336
-
337
- # source://kramdown-2.4.0/lib/kramdown/converter/html.rb:178
338
- def convert_li(el, indent); end
339
-
340
- # source://kramdown-2.4.0/lib/kramdown/converter/html.rb:351
341
- def convert_math(el, indent); end
342
-
343
- # source://kramdown-2.4.0/lib/kramdown/converter/html.rb:162
344
- def convert_ol(el, indent); end
345
-
346
- # source://kramdown-2.4.0/lib/kramdown/converter/html.rb:86
347
- def convert_p(el, indent); end
348
-
349
- # source://kramdown-2.4.0/lib/kramdown/converter/html.rb:311
350
- def convert_raw(el, _indent); end
351
-
352
- # source://kramdown-2.4.0/lib/kramdown/converter/html.rb:372
353
- def convert_root(el, indent); end
354
-
355
- # source://kramdown-2.4.0/lib/kramdown/converter/html.rb:347
356
- def convert_smart_quote(el, _indent); end
357
-
358
- # Helper method used by +convert_p+ to convert a paragraph that only contains a single :img
359
- # element.
360
- #
361
- # source://kramdown-2.4.0/lib/kramdown/converter/html.rb:99
362
- def convert_standalone_image(el, indent); end
363
-
364
- # source://kramdown-2.4.0/lib/kramdown/converter/html.rb:319
365
- def convert_strong(el, indent); end
366
-
367
- # source://kramdown-2.4.0/lib/kramdown/converter/html.rb:238
368
- def convert_table(el, indent); end
369
-
370
- # source://kramdown-2.4.0/lib/kramdown/converter/html.rb:238
371
- def convert_tbody(el, indent); end
372
-
373
- # source://kramdown-2.4.0/lib/kramdown/converter/html.rb:248
374
- def convert_td(el, indent); end
375
-
376
- # source://kramdown-2.4.0/lib/kramdown/converter/html.rb:81
377
- def convert_text(el, _indent); end
378
-
379
- # source://kramdown-2.4.0/lib/kramdown/converter/html.rb:238
380
- def convert_tfoot(el, indent); end
381
-
382
- # source://kramdown-2.4.0/lib/kramdown/converter/html.rb:238
383
- def convert_thead(el, indent); end
384
-
385
- # source://kramdown-2.4.0/lib/kramdown/converter/html.rb:238
386
- def convert_tr(el, indent); end
387
-
388
- # source://kramdown-2.4.0/lib/kramdown/converter/html.rb:339
389
- def convert_typographic_sym(el, _indent); end
390
-
391
- # source://kramdown-2.4.0/lib/kramdown/converter/html.rb:162
392
- def convert_ul(el, indent); end
393
-
394
- # source://kramdown-2.4.0/lib/kramdown/converter/html.rb:228
395
- def convert_xml_comment(el, indent); end
396
-
397
- # source://kramdown-2.4.0/lib/kramdown/converter/html.rb:228
398
- def convert_xml_pi(el, indent); end
399
-
400
- # Fixes the elements for use in a TOC entry.
401
- #
402
- # source://kramdown-2.4.0/lib/kramdown/converter/html.rb:453
403
- def fix_for_toc_entry(elements); end
404
-
405
- # Return an HTML ordered list with the footnote content for the used footnotes.
406
- #
407
- # source://kramdown-2.4.0/lib/kramdown/converter/html.rb:488
408
- def footnote_content; end
409
-
410
- # Format the given element as block HTML.
411
- #
412
- # source://kramdown-2.4.0/lib/kramdown/converter/html.rb:397
413
- def format_as_block_html(name, attr, body, indent); end
414
-
415
- # Format the given element as block HTML with a newline after the start tag and indentation
416
- # before the end tag.
417
- #
418
- # source://kramdown-2.4.0/lib/kramdown/converter/html.rb:403
419
- def format_as_indented_block_html(name, attr, body, indent); end
420
-
421
- # Format the given element as span HTML.
422
- #
423
- # source://kramdown-2.4.0/lib/kramdown/converter/html.rb:392
424
- def format_as_span_html(name, attr, body); end
425
-
426
- # Generate and return an element tree for the table of contents.
427
- #
428
- # source://kramdown-2.4.0/lib/kramdown/converter/html.rb:415
429
- def generate_toc_tree(toc, type, attr); end
430
-
431
- # The amount of indentation used when nesting HTML tags.
432
- #
433
- # source://kramdown-2.4.0/lib/kramdown/converter/html.rb:36
434
- def indent; end
435
-
436
- # The amount of indentation used when nesting HTML tags.
437
- #
438
- # source://kramdown-2.4.0/lib/kramdown/converter/html.rb:36
439
- def indent=(_arg0); end
440
-
441
- # Return the converted content of the children of +el+ as a string. The parameter +indent+ has
442
- # to be the amount of indentation used for the element +el+.
443
- #
444
- # Pushes +el+ onto the @stack before converting the child elements and pops it from the stack
445
- # afterwards.
446
- #
447
- # source://kramdown-2.4.0/lib/kramdown/converter/html.rb:66
448
- def inner(el, indent); end
449
-
450
- # Obfuscate the +text+ by using HTML entities.
451
- #
452
- # source://kramdown-2.4.0/lib/kramdown/converter/html.rb:476
453
- def obfuscate(text); end
454
-
455
- # Remove all footnotes from the given elements.
456
- #
457
- # source://kramdown-2.4.0/lib/kramdown/converter/html.rb:468
458
- def remove_footnotes(elements); end
459
-
460
- # Remove all link elements by unwrapping them.
461
- #
462
- # source://kramdown-2.4.0/lib/kramdown/converter/html.rb:460
463
- def unwrap_links(elements); end
464
- end
465
-
466
- # source://kramdown-2.4.0/lib/kramdown/converter/html.rb:246
467
- Kramdown::Converter::Html::ENTITY_NBSP = T.let(T.unsafe(nil), Kramdown::Utils::Entities::Entity)
468
-
469
- # source://kramdown-2.4.0/lib/kramdown/converter/html.rb:485
470
- Kramdown::Converter::Html::FOOTNOTE_BACKLINK_FMT = T.let(T.unsafe(nil), String)
471
-
472
- # source://kramdown-2.4.0/lib/kramdown/converter/html.rb:328
473
- Kramdown::Converter::Html::TYPOGRAPHIC_SYMS = T.let(T.unsafe(nil), Hash)
474
-
475
- # source://kramdown-2.4.0/lib/kramdown/converter/html.rb:159
476
- Kramdown::Converter::Html::ZERO_TO_ONETWENTYEIGHT = T.let(T.unsafe(nil), Array)
477
-
478
- # Converts an element tree to the kramdown format.
479
- #
480
- # source://kramdown-2.4.0/lib/kramdown/converter/kramdown.rb:18
481
- class Kramdown::Converter::Kramdown < ::Kramdown::Converter::Base
482
- include ::Kramdown::Utils::Html
483
-
484
- # @return [Kramdown] a new instance of Kramdown
485
- #
486
- # source://kramdown-2.4.0/lib/kramdown/converter/kramdown.rb:24
487
- def initialize(root, options); end
488
-
489
- # source://kramdown-2.4.0/lib/kramdown/converter/kramdown.rb:34
490
- def convert(el, opts = T.unsafe(nil)); end
491
-
492
- # source://kramdown-2.4.0/lib/kramdown/converter/kramdown.rb:291
493
- def convert_a(el, opts); end
494
-
495
- # source://kramdown-2.4.0/lib/kramdown/converter/kramdown.rb:377
496
- def convert_abbreviation(el, _opts); end
497
-
498
- # source://kramdown-2.4.0/lib/kramdown/converter/kramdown.rb:70
499
- def convert_blank(_el, _opts); end
500
-
501
- # source://kramdown-2.4.0/lib/kramdown/converter/kramdown.rb:107
502
- def convert_blockquote(el, opts); end
503
-
504
- # source://kramdown-2.4.0/lib/kramdown/converter/kramdown.rb:287
505
- def convert_br(_el, _opts); end
506
-
507
- # source://kramdown-2.4.0/lib/kramdown/converter/kramdown.rb:103
508
- def convert_codeblock(el, _opts); end
509
-
510
- # source://kramdown-2.4.0/lib/kramdown/converter/kramdown.rb:324
511
- def convert_codespan(el, _opts); end
512
-
513
- # source://kramdown-2.4.0/lib/kramdown/converter/kramdown.rb:279
514
- def convert_comment(el, _opts); end
515
-
516
- # source://kramdown-2.4.0/lib/kramdown/converter/kramdown.rb:158
517
- def convert_dd(el, opts); end
518
-
519
- # source://kramdown-2.4.0/lib/kramdown/converter/kramdown.rb:124
520
- def convert_dl(el, opts); end
521
-
522
- # source://kramdown-2.4.0/lib/kramdown/converter/kramdown.rb:182
523
- def convert_dt(el, opts); end
524
-
525
- # source://kramdown-2.4.0/lib/kramdown/converter/kramdown.rb:346
526
- def convert_em(el, opts); end
527
-
528
- # source://kramdown-2.4.0/lib/kramdown/converter/kramdown.rb:356
529
- def convert_entity(el, _opts); end
530
-
531
- # source://kramdown-2.4.0/lib/kramdown/converter/kramdown.rb:329
532
- def convert_footnote(el, _opts); end
533
-
534
- # source://kramdown-2.4.0/lib/kramdown/converter/kramdown.rb:112
535
- def convert_header(el, opts); end
536
-
537
- # source://kramdown-2.4.0/lib/kramdown/converter/kramdown.rb:120
538
- def convert_hr(_el, _opts); end
539
-
540
- # source://kramdown-2.4.0/lib/kramdown/converter/kramdown.rb:195
541
- def convert_html_element(el, opts); end
542
-
543
- # source://kramdown-2.4.0/lib/kramdown/converter/kramdown.rb:308
544
- def convert_img(el, _opts); end
545
-
546
- # source://kramdown-2.4.0/lib/kramdown/converter/kramdown.rb:130
547
- def convert_li(el, opts); end
548
-
549
- # source://kramdown-2.4.0/lib/kramdown/converter/kramdown.rb:373
550
- def convert_math(el, _opts); end
551
-
552
- # source://kramdown-2.4.0/lib/kramdown/converter/kramdown.rb:124
553
- def convert_ol(el, opts); end
554
-
555
- # source://kramdown-2.4.0/lib/kramdown/converter/kramdown.rb:88
556
- def convert_p(el, opts); end
557
-
558
- # source://kramdown-2.4.0/lib/kramdown/converter/kramdown.rb:334
559
- def convert_raw(el, _opts); end
560
-
561
- # source://kramdown-2.4.0/lib/kramdown/converter/kramdown.rb:381
562
- def convert_root(el, opts); end
563
-
564
- # source://kramdown-2.4.0/lib/kramdown/converter/kramdown.rb:369
565
- def convert_smart_quote(el, _opts); end
566
-
567
- # source://kramdown-2.4.0/lib/kramdown/converter/kramdown.rb:351
568
- def convert_strong(el, opts); end
569
-
570
- # source://kramdown-2.4.0/lib/kramdown/converter/kramdown.rb:239
571
- def convert_table(el, opts); end
572
-
573
- # source://kramdown-2.4.0/lib/kramdown/converter/kramdown.rb:260
574
- def convert_tbody(el, opts); end
575
-
576
- # source://kramdown-2.4.0/lib/kramdown/converter/kramdown.rb:275
577
- def convert_td(el, opts); end
578
-
579
- # source://kramdown-2.4.0/lib/kramdown/converter/kramdown.rb:76
580
- def convert_text(el, opts); end
581
-
582
- # source://kramdown-2.4.0/lib/kramdown/converter/kramdown.rb:267
583
- def convert_tfoot(el, opts); end
584
-
585
- # source://kramdown-2.4.0/lib/kramdown/converter/kramdown.rb:244
586
- def convert_thead(el, opts); end
587
-
588
- # source://kramdown-2.4.0/lib/kramdown/converter/kramdown.rb:271
589
- def convert_tr(el, opts); end
590
-
591
- # source://kramdown-2.4.0/lib/kramdown/converter/kramdown.rb:365
592
- def convert_typographic_sym(el, _opts); end
593
-
594
- # source://kramdown-2.4.0/lib/kramdown/converter/kramdown.rb:124
595
- def convert_ul(el, opts); end
596
-
597
- # source://kramdown-2.4.0/lib/kramdown/converter/kramdown.rb:229
598
- def convert_xml_comment(el, _opts); end
599
-
600
- # source://kramdown-2.4.0/lib/kramdown/converter/kramdown.rb:229
601
- def convert_xml_pi(el, _opts); end
602
-
603
- # source://kramdown-2.4.0/lib/kramdown/converter/kramdown.rb:408
604
- def create_abbrev_defs; end
605
-
606
- # source://kramdown-2.4.0/lib/kramdown/converter/kramdown.rb:399
607
- def create_footnote_defs; end
608
-
609
- # source://kramdown-2.4.0/lib/kramdown/converter/kramdown.rb:389
610
- def create_link_defs; end
611
-
612
- # Return the IAL containing the attributes of the element +el+.
613
- #
614
- # source://kramdown-2.4.0/lib/kramdown/converter/kramdown.rb:419
615
- def ial_for_element(el); end
616
-
617
- # source://kramdown-2.4.0/lib/kramdown/converter/kramdown.rb:54
618
- def inner(el, opts = T.unsafe(nil)); end
619
-
620
- # source://kramdown-2.4.0/lib/kramdown/converter/kramdown.rb:444
621
- def parse_title(attr); end
622
- end
623
-
624
- # source://kramdown-2.4.0/lib/kramdown/converter/kramdown.rb:74
625
- Kramdown::Converter::Kramdown::ESCAPED_CHAR_RE = T.let(T.unsafe(nil), Regexp)
626
-
627
- # source://kramdown-2.4.0/lib/kramdown/converter/kramdown.rb:192
628
- Kramdown::Converter::Kramdown::HTML_ELEMENT_TYPES = T.let(T.unsafe(nil), Array)
629
-
630
- # source://kramdown-2.4.0/lib/kramdown/converter/kramdown.rb:190
631
- Kramdown::Converter::Kramdown::HTML_TAGS_WITH_BODY = T.let(T.unsafe(nil), Array)
632
-
633
- # source://kramdown-2.4.0/lib/kramdown/converter/kramdown.rb:360
634
- Kramdown::Converter::Kramdown::TYPOGRAPHIC_SYMS = T.let(T.unsafe(nil), Hash)
635
-
636
- # Converts an element tree to LaTeX.
637
- #
638
- # This converter uses ideas from other Markdown-to-LaTeX converters like Pandoc and Maruku.
639
- #
640
- # You can customize this converter by sub-classing it and overriding the +convert_NAME+ methods.
641
- # Each such method takes the following parameters:
642
- #
643
- # [+el+] The element of type +NAME+ to be converted.
644
- #
645
- # [+opts+] A hash containing processing options that are passed down from parent elements. The
646
- # key :parent is always set and contains the parent element as value.
647
- #
648
- # The return value of such a method has to be a string containing the element +el+ formatted
649
- # correctly as LaTeX markup.
650
- #
651
- # source://kramdown-2.4.0/lib/kramdown/converter/latex.rb:31
652
- class Kramdown::Converter::Latex < ::Kramdown::Converter::Base
653
- # Initialize the LaTeX converter with the +root+ element and the conversion +options+.
654
- #
655
- # @return [Latex] a new instance of Latex
656
- #
657
- # source://kramdown-2.4.0/lib/kramdown/converter/latex.rb:34
658
- def initialize(root, options); end
659
-
660
- # Return a LaTeX comment containing all attributes as 'key="value"' pairs.
661
- #
662
- # source://kramdown-2.4.0/lib/kramdown/converter/latex.rb:599
663
- def attribute_list(el); end
664
-
665
- # Dispatch the conversion of the element +el+ to a +convert_TYPE+ method using the +type+ of
666
- # the element.
667
- #
668
- # source://kramdown-2.4.0/lib/kramdown/converter/latex.rb:41
669
- def convert(el, opts = T.unsafe(nil)); end
670
-
671
- # source://kramdown-2.4.0/lib/kramdown/converter/latex.rb:216
672
- def convert_a(el, opts); end
673
-
674
- # source://kramdown-2.4.0/lib/kramdown/converter/latex.rb:569
675
- def convert_abbreviation(el, _opts); end
676
-
677
- # source://kramdown-2.4.0/lib/kramdown/converter/latex.rb:61
678
- def convert_blank(_el, opts); end
679
-
680
- # source://kramdown-2.4.0/lib/kramdown/converter/latex.rb:110
681
- def convert_blockquote(el, opts); end
682
-
683
- # source://kramdown-2.4.0/lib/kramdown/converter/latex.rb:209
684
- def convert_br(_el, opts); end
685
-
686
- # source://kramdown-2.4.0/lib/kramdown/converter/latex.rb:87
687
- def convert_codeblock(el, _opts); end
688
-
689
- # source://kramdown-2.4.0/lib/kramdown/converter/latex.rb:239
690
- def convert_codespan(el, _opts); end
691
-
692
- # source://kramdown-2.4.0/lib/kramdown/converter/latex.rb:205
693
- def convert_comment(el, _opts); end
694
-
695
- # source://kramdown-2.4.0/lib/kramdown/converter/latex.rb:151
696
- def convert_dd(el, opts); end
697
-
698
- # source://kramdown-2.4.0/lib/kramdown/converter/latex.rb:139
699
- def convert_dl(el, opts); end
700
-
701
- # source://kramdown-2.4.0/lib/kramdown/converter/latex.rb:147
702
- def convert_dt(el, opts); end
703
-
704
- # source://kramdown-2.4.0/lib/kramdown/converter/latex.rb:263
705
- def convert_em(el, opts); end
706
-
707
- # source://kramdown-2.4.0/lib/kramdown/converter/latex.rb:533
708
- def convert_entity(el, _opts); end
709
-
710
- # source://kramdown-2.4.0/lib/kramdown/converter/latex.rb:250
711
- def convert_footnote(el, opts); end
712
-
713
- # source://kramdown-2.4.0/lib/kramdown/converter/latex.rb:114
714
- def convert_header(el, opts); end
715
-
716
- # source://kramdown-2.4.0/lib/kramdown/converter/latex.rb:124
717
- def convert_hr(el, _opts); end
718
-
719
- # source://kramdown-2.4.0/lib/kramdown/converter/latex.rb:155
720
- def convert_html_element(el, opts); end
721
-
722
- # source://kramdown-2.4.0/lib/kramdown/converter/latex.rb:225
723
- def convert_img(el, _opts); end
724
-
725
- # source://kramdown-2.4.0/lib/kramdown/converter/latex.rb:143
726
- def convert_li(el, opts); end
727
-
728
- # source://kramdown-2.4.0/lib/kramdown/converter/latex.rb:556
729
- def convert_math(el, _opts); end
730
-
731
- # source://kramdown-2.4.0/lib/kramdown/converter/latex.rb:129
732
- def convert_ol(el, opts); end
733
-
734
- # source://kramdown-2.4.0/lib/kramdown/converter/latex.rb:69
735
- def convert_p(el, opts); end
736
-
737
- # source://kramdown-2.4.0/lib/kramdown/converter/latex.rb:255
738
- def convert_raw(el, _opts); end
739
-
740
- # source://kramdown-2.4.0/lib/kramdown/converter/latex.rb:57
741
- def convert_root(el, opts); end
742
-
743
- # source://kramdown-2.4.0/lib/kramdown/converter/latex.rb:550
744
- def convert_smart_quote(el, opts); end
745
-
746
- # Helper method used by +convert_p+ to convert a paragraph that only contains a single :img
747
- # element.
748
- #
749
- # source://kramdown-2.4.0/lib/kramdown/converter/latex.rb:80
750
- def convert_standalone_image(el, _opts, img); end
751
-
752
- # source://kramdown-2.4.0/lib/kramdown/converter/latex.rb:267
753
- def convert_strong(el, opts); end
754
-
755
- # source://kramdown-2.4.0/lib/kramdown/converter/latex.rb:177
756
- def convert_table(el, opts); end
757
-
758
- # source://kramdown-2.4.0/lib/kramdown/converter/latex.rb:189
759
- def convert_tbody(el, opts); end
760
-
761
- # source://kramdown-2.4.0/lib/kramdown/converter/latex.rb:201
762
- def convert_td(el, opts); end
763
-
764
- # source://kramdown-2.4.0/lib/kramdown/converter/latex.rb:65
765
- def convert_text(el, _opts); end
766
-
767
- # source://kramdown-2.4.0/lib/kramdown/converter/latex.rb:193
768
- def convert_tfoot(el, opts); end
769
-
770
- # source://kramdown-2.4.0/lib/kramdown/converter/latex.rb:185
771
- def convert_thead(el, opts); end
772
-
773
- # source://kramdown-2.4.0/lib/kramdown/converter/latex.rb:197
774
- def convert_tr(el, opts); end
775
-
776
- # source://kramdown-2.4.0/lib/kramdown/converter/latex.rb:542
777
- def convert_typographic_sym(el, _opts); end
778
-
779
- # source://kramdown-2.4.0/lib/kramdown/converter/latex.rb:129
780
- def convert_ul(el, opts); end
781
-
782
- # source://kramdown-2.4.0/lib/kramdown/converter/latex.rb:166
783
- def convert_xml_comment(el, _opts); end
784
-
785
- # source://kramdown-2.4.0/lib/kramdown/converter/latex.rb:170
786
- def convert_xml_pi(_el, _opts); end
787
-
788
- # source://kramdown-2.4.0/lib/kramdown/converter/latex.rb:522
789
- def entity_to_latex(entity); end
790
-
791
- # Escape the special LaTeX characters in the string +str+.
792
- #
793
- # source://kramdown-2.4.0/lib/kramdown/converter/latex.rb:618
794
- def escape(str); end
795
-
796
- # Return the converted content of the children of +el+ as a string.
797
- #
798
- # source://kramdown-2.4.0/lib/kramdown/converter/latex.rb:46
799
- def inner(el, opts); end
800
-
801
- # Wrap the +text+ inside a LaTeX environment of type +type+. The element +el+ is passed on to
802
- # the method #attribute_list -- the resulting string is appended to both the \\begin and the
803
- # \\end lines of the LaTeX environment for easier post-processing of LaTeX environments.
804
- #
805
- # source://kramdown-2.4.0/lib/kramdown/converter/latex.rb:582
806
- def latex_environment(type, el, text); end
807
-
808
- # Return a string containing a valid \hypertarget command if the element has an ID defined, or
809
- # +nil+ otherwise. If the parameter +add_label+ is +true+, a \label command will also be used
810
- # additionally to the \hypertarget command.
811
- #
812
- # source://kramdown-2.4.0/lib/kramdown/converter/latex.rb:590
813
- def latex_link_target(el, add_label = T.unsafe(nil)); end
814
-
815
- # Normalize the abbreviation key so that it only contains allowed ASCII character
816
- #
817
- # source://kramdown-2.4.0/lib/kramdown/converter/latex.rb:575
818
- def normalize_abbreviation_key(key); end
819
- end
820
-
821
- # Inspired by Maruku: entity conversion table based on the one from htmltolatex
822
- # (http://sourceforge.net/projects/htmltolatex/), with some small adjustments/additions
823
- #
824
- # source://kramdown-2.4.0/lib/kramdown/converter/latex.rb:273
825
- Kramdown::Converter::Latex::ENTITY_CONV_TABLE = T.let(T.unsafe(nil), Hash)
826
-
827
- # source://kramdown-2.4.0/lib/kramdown/converter/latex.rb:605
828
- Kramdown::Converter::Latex::ESCAPE_MAP = T.let(T.unsafe(nil), Hash)
829
-
830
- # source://kramdown-2.4.0/lib/kramdown/converter/latex.rb:615
831
- Kramdown::Converter::Latex::ESCAPE_RE = T.let(T.unsafe(nil), Regexp)
832
-
833
- # source://kramdown-2.4.0/lib/kramdown/converter/latex.rb:175
834
- Kramdown::Converter::Latex::TABLE_ALIGNMENT_CHAR = T.let(T.unsafe(nil), Hash)
835
-
836
- # source://kramdown-2.4.0/lib/kramdown/converter/latex.rb:537
837
- Kramdown::Converter::Latex::TYPOGRAPHIC_SYMS = T.let(T.unsafe(nil), Hash)
838
-
839
- # Converts a Kramdown::Document to a manpage in groff format. See man(7), groff_man(7) and
840
- # man-pages(7) for information regarding the output.
841
- #
842
- # source://kramdown-2.4.0/lib/kramdown/converter/man.rb:18
843
- class Kramdown::Converter::Man < ::Kramdown::Converter::Base
844
- # source://kramdown-2.4.0/lib/kramdown/converter/man.rb:20
845
- def convert(el, opts = T.unsafe(nil)); end
846
-
847
- private
848
-
849
- # source://kramdown-2.4.0/lib/kramdown/converter/man.rb:191
850
- def convert_a(el, opts); end
851
-
852
- # source://kramdown-2.4.0/lib/kramdown/converter/man.rb:229
853
- def convert_abbreviation(el, opts); end
854
-
855
- # source://kramdown-2.4.0/lib/kramdown/converter/man.rb:47
856
- def convert_blank(*_arg0); end
857
-
858
- # source://kramdown-2.4.0/lib/kramdown/converter/man.rb:95
859
- def convert_blockquote(el, opts); end
860
-
861
- # source://kramdown-2.4.0/lib/kramdown/converter/man.rb:225
862
- def convert_br(_el, opts); end
863
-
864
- # source://kramdown-2.4.0/lib/kramdown/converter/man.rb:89
865
- def convert_codeblock(el, opts); end
866
-
867
- # source://kramdown-2.4.0/lib/kramdown/converter/man.rb:221
868
- def convert_codespan(el, opts); end
869
-
870
- # source://kramdown-2.4.0/lib/kramdown/converter/man.rb:186
871
- def convert_comment(el, opts); end
872
-
873
- # source://kramdown-2.4.0/lib/kramdown/converter/man.rb:127
874
- def convert_dd(el, opts); end
875
-
876
- # source://kramdown-2.4.0/lib/kramdown/converter/man.rb:101
877
- def convert_dl(el, opts); end
878
-
879
- # source://kramdown-2.4.0/lib/kramdown/converter/man.rb:121
880
- def convert_dt(el, opts); end
881
-
882
- # source://kramdown-2.4.0/lib/kramdown/converter/man.rb:209
883
- def convert_em(el, opts); end
884
-
885
- # source://kramdown-2.4.0/lib/kramdown/converter/man.rb:255
886
- def convert_entity(el, opts); end
887
-
888
- # source://kramdown-2.4.0/lib/kramdown/converter/man.rb:241
889
- def convert_footnote(*_arg0); end
890
-
891
- # source://kramdown-2.4.0/lib/kramdown/converter/man.rb:61
892
- def convert_header(el, opts); end
893
-
894
- # source://kramdown-2.4.0/lib/kramdown/converter/man.rb:47
895
- def convert_hr(*_arg0); end
896
-
897
- # source://kramdown-2.4.0/lib/kramdown/converter/man.rb:182
898
- def convert_html_element(*_arg0); end
899
-
900
- # source://kramdown-2.4.0/lib/kramdown/converter/man.rb:205
901
- def convert_img(_el, _opts); end
902
-
903
- # source://kramdown-2.4.0/lib/kramdown/converter/man.rb:110
904
- def convert_li(el, opts); end
905
-
906
- # source://kramdown-2.4.0/lib/kramdown/converter/man.rb:233
907
- def convert_math(el, opts); end
908
-
909
- # source://kramdown-2.4.0/lib/kramdown/converter/man.rb:101
910
- def convert_ol(el, opts); end
911
-
912
- # source://kramdown-2.4.0/lib/kramdown/converter/man.rb:52
913
- def convert_p(el, opts); end
914
-
915
- # source://kramdown-2.4.0/lib/kramdown/converter/man.rb:245
916
- def convert_raw(*_arg0); end
917
-
918
- # source://kramdown-2.4.0/lib/kramdown/converter/man.rb:40
919
- def convert_root(el, opts); end
920
-
921
- # source://kramdown-2.4.0/lib/kramdown/converter/man.rb:259
922
- def convert_smart_quote(el, opts); end
923
-
924
- # source://kramdown-2.4.0/lib/kramdown/converter/man.rb:215
925
- def convert_strong(el, opts); end
926
-
927
- # source://kramdown-2.4.0/lib/kramdown/converter/man.rb:139
928
- def convert_table(el, opts); end
929
-
930
- # source://kramdown-2.4.0/lib/kramdown/converter/man.rb:154
931
- def convert_tbody(el, opts); end
932
-
933
- # source://kramdown-2.4.0/lib/kramdown/converter/man.rb:170
934
- def convert_td(el, opts); end
935
-
936
- # source://kramdown-2.4.0/lib/kramdown/converter/man.rb:249
937
- def convert_text(el, opts); end
938
-
939
- # source://kramdown-2.4.0/lib/kramdown/converter/man.rb:161
940
- def convert_tfoot(el, opts); end
941
-
942
- # source://kramdown-2.4.0/lib/kramdown/converter/man.rb:148
943
- def convert_thead(el, opts); end
944
-
945
- # source://kramdown-2.4.0/lib/kramdown/converter/man.rb:165
946
- def convert_tr(el, opts); end
947
-
948
- # source://kramdown-2.4.0/lib/kramdown/converter/man.rb:268
949
- def convert_typographic_sym(el, opts); end
950
-
951
- # source://kramdown-2.4.0/lib/kramdown/converter/man.rb:101
952
- def convert_ul(el, opts); end
953
-
954
- # source://kramdown-2.4.0/lib/kramdown/converter/man.rb:186
955
- def convert_xml_comment(el, opts); end
956
-
957
- # source://kramdown-2.4.0/lib/kramdown/converter/man.rb:47
958
- def convert_xml_pi(*_arg0); end
959
-
960
- # source://kramdown-2.4.0/lib/kramdown/converter/man.rb:285
961
- def escape(text, preserve_whitespace = T.unsafe(nil)); end
962
-
963
- # source://kramdown-2.4.0/lib/kramdown/converter/man.rb:26
964
- def inner(el, opts, use = T.unsafe(nil)); end
965
-
966
- # source://kramdown-2.4.0/lib/kramdown/converter/man.rb:272
967
- def macro(name, *args); end
968
-
969
- # source://kramdown-2.4.0/lib/kramdown/converter/man.rb:276
970
- def newline(text); end
971
-
972
- # source://kramdown-2.4.0/lib/kramdown/converter/man.rb:281
973
- def quote(text); end
974
-
975
- # source://kramdown-2.4.0/lib/kramdown/converter/man.rb:293
976
- def unicode_char(codepoint); end
977
- end
978
-
979
- # source://kramdown-2.4.0/lib/kramdown/converter/man.rb:137
980
- Kramdown::Converter::Man::TABLE_CELL_ALIGNMENT = T.let(T.unsafe(nil), Hash)
981
-
982
- # source://kramdown-2.4.0/lib/kramdown/converter/man.rb:263
983
- Kramdown::Converter::Man::TYPOGRAPHIC_SYMS_MAP = T.let(T.unsafe(nil), Hash)
984
-
985
- # Removes all block (and optionally span) level HTML tags from the element tree.
986
- #
987
- # This converter can be used on parsed HTML documents to get an element tree that will only
988
- # contain native kramdown elements.
989
- #
990
- # *Note* that the returned element tree may not be fully conformant (i.e. the content models of
991
- # *some elements may be violated)!
992
- #
993
- # This converter modifies the given tree in-place and returns it.
994
- #
995
- # source://kramdown-2.4.0/lib/kramdown/converter/remove_html_tags.rb:25
996
- class Kramdown::Converter::RemoveHtmlTags < ::Kramdown::Converter::Base
997
- # @return [RemoveHtmlTags] a new instance of RemoveHtmlTags
998
- #
999
- # source://kramdown-2.4.0/lib/kramdown/converter/remove_html_tags.rb:27
1000
- def initialize(root, options); end
1001
-
1002
- # source://kramdown-2.4.0/lib/kramdown/converter/remove_html_tags.rb:32
1003
- def convert(el); end
1004
- end
1005
-
1006
- # Converts a Kramdown::Document to an element tree that represents the table of contents.
1007
- #
1008
- # The returned tree consists of Element objects of type :toc where the root element is just used
1009
- # as container object. Each :toc element contains as value the wrapped :header element and under
1010
- # the attribute key :id the header ID that should be used (note that this ID may not exist in
1011
- # the wrapped element).
1012
- #
1013
- # Since the TOC tree consists of special :toc elements, one cannot directly feed this tree to
1014
- # other converters!
1015
- #
1016
- # source://kramdown-2.4.0/lib/kramdown/converter/toc.rb:25
1017
- class Kramdown::Converter::Toc < ::Kramdown::Converter::Base
1018
- # @return [Toc] a new instance of Toc
1019
- #
1020
- # source://kramdown-2.4.0/lib/kramdown/converter/toc.rb:27
1021
- def initialize(root, options); end
1022
-
1023
- # source://kramdown-2.4.0/lib/kramdown/converter/toc.rb:34
1024
- def convert(el); end
1025
-
1026
- private
1027
-
1028
- # source://kramdown-2.4.0/lib/kramdown/converter/toc.rb:47
1029
- def add_to_toc(el, id); end
1030
- end
1031
-
1032
- # The main interface to kramdown.
1033
- #
1034
- # This class provides a one-stop-shop for using kramdown to convert text into various output
1035
- # formats. Use it like this:
1036
- #
1037
- # require 'kramdown'
1038
- # doc = Kramdown::Document.new('This *is* some kramdown text')
1039
- # puts doc.to_html
1040
- #
1041
- # The #to_html method is a shortcut for using the Converter::Html class. See #method_missing for
1042
- # more information.
1043
- #
1044
- # The second argument to the ::new method is an options hash for customizing the behaviour of the
1045
- # used parser and the converter. See ::new for more information!
1046
- #
1047
- # source://kramdown-2.4.0/lib/kramdown/document.rb:73
1048
- class Kramdown::Document
1049
- # Create a new Kramdown document from the string +source+ and use the provided +options+. The
1050
- # options that can be used are defined in the Options module.
1051
- #
1052
- # The special options key :input can be used to select the parser that should parse the
1053
- # +source+. It has to be the name of a class in the Kramdown::Parser module. For example, to
1054
- # select the kramdown parser, one would set the :input key to +Kramdown+. If this key is not
1055
- # set, it defaults to +Kramdown+.
1056
- #
1057
- # The +source+ is immediately parsed by the selected parser so that the root element is
1058
- # immediately available and the output can be generated.
1059
- #
1060
- # @return [Document] a new instance of Document
1061
- #
1062
- # source://kramdown-2.4.0/lib/kramdown/document.rb:96
1063
- def initialize(source, options = T.unsafe(nil)); end
1064
-
1065
- # source://kramdown-2.4.0/lib/kramdown/document.rb:124
1066
- def inspect; end
1067
-
1068
- # Check if a method is invoked that begins with +to_+ and if so, try to instantiate a converter
1069
- # class (i.e. a class in the Kramdown::Converter module) and use it for converting the document.
1070
- #
1071
- # For example, +to_html+ would instantiate the Kramdown::Converter::Html class.
1072
- #
1073
- # source://kramdown-2.4.0/lib/kramdown/document.rb:113
1074
- def method_missing(id, *attr, &block); end
1075
-
1076
- # The options hash which holds the options for parsing/converting the Kramdown document.
1077
- #
1078
- # source://kramdown-2.4.0/lib/kramdown/document.rb:80
1079
- def options; end
1080
-
1081
- # The root Element of the element tree. It is immediately available after the ::new method has
1082
- # been called.
1083
- #
1084
- # source://kramdown-2.4.0/lib/kramdown/document.rb:77
1085
- def root; end
1086
-
1087
- # The root Element of the element tree. It is immediately available after the ::new method has
1088
- # been called.
1089
- #
1090
- # source://kramdown-2.4.0/lib/kramdown/document.rb:77
1091
- def root=(_arg0); end
1092
-
1093
- # An array of warning messages. It is filled with warnings during the parsing phase (i.e. in
1094
- # ::new) and the conversion phase.
1095
- #
1096
- # source://kramdown-2.4.0/lib/kramdown/document.rb:84
1097
- def warnings; end
1098
-
1099
- protected
1100
-
1101
- # Try requiring a parser or converter class and don't raise an error if the file is not found.
1102
- #
1103
- # source://kramdown-2.4.0/lib/kramdown/document.rb:129
1104
- def try_require(type, name); end
1105
- end
1106
-
1107
- # Represents all elements in the element tree.
1108
- #
1109
- # kramdown only uses this one class for representing all available elements in an element tree
1110
- # (paragraphs, headers, emphasis, ...). The type of element can be set via the #type accessor.
1111
- #
1112
- # The root of a kramdown element tree has to be an element of type :root. It needs to have certain
1113
- # option keys set so that conversions work correctly. If only a part of a tree should be
1114
- # converted, duplicate the root node and assign the #children appropriately, e.g:
1115
- #
1116
- # root = doc.root
1117
- # new_root = root.dup
1118
- # new_root.children = [root.children[0]] # assign new array with elements to convert
1119
- #
1120
- # Following is a description of all supported element types.
1121
- #
1122
- # Note that the option :location may contain the start line number of an element in the source
1123
- # document.
1124
- #
1125
- # == Structural Elements
1126
- #
1127
- # === :root
1128
- #
1129
- # [Category] None
1130
- # [Usage context] As the root element of a document
1131
- # [Content model] Block-level elements
1132
- #
1133
- # Represents the root of a kramdown document.
1134
- #
1135
- # The root element contains the following option keys:
1136
- #
1137
- # parts of the kramdown document.
1138
- #
1139
- # :abbrev_defs:: This key may be used to store the mapping of abbreviation to abbreviation
1140
- # definition.
1141
- #
1142
- # :abbrev_attr:: This key may be used to store the mapping of abbreviation to abbreviation
1143
- # attributes.
1144
- #
1145
- # :options:: This key may be used to store options that were set during parsing of the document.
1146
- #
1147
- # :footnote_count:: This key stores the number of actually referenced footnotes of the document.
1148
- #
1149
- # === :blank
1150
- #
1151
- # [Category] Block-level element
1152
- # [Usage context] Where block-level elements are expected
1153
- # [Content model] Empty
1154
- #
1155
- # Represents one or more blank lines. It is not allowed to have two or more consecutive blank
1156
- # elements.
1157
- #
1158
- # The +value+ field may contain the original content of the blank lines.
1159
- #
1160
- #
1161
- # === :p
1162
- #
1163
- # [Category] Block-level element
1164
- # [Usage context] Where block-level elements are expected
1165
- # [Content model] Span-level elements
1166
- #
1167
- # Represents a paragraph.
1168
- #
1169
- # If the option :transparent is +true+, this element just represents a block of text. I.e. this
1170
- # element just functions as a container for span-level elements.
1171
- #
1172
- #
1173
- # === :header
1174
- #
1175
- # [Category] Block-level element
1176
- # [Usage context] Where block-level elements are expected
1177
- # [Content model] Span-level elements
1178
- #
1179
- # Represents a header.
1180
- #
1181
- # The option :level specifies the header level and has to contain a number between 1 and \6. The
1182
- # option :raw_text has to contain the raw header text.
1183
- #
1184
- #
1185
- # === :blockquote
1186
- #
1187
- # [Category] Block-level element
1188
- # [Usage context] Where block-level elements are expected
1189
- # [Content model] Block-level elements
1190
- #
1191
- # Represents a blockquote.
1192
- #
1193
- #
1194
- # === :codeblock
1195
- #
1196
- # [Category] Block-level element
1197
- # [Usage context] Where block-level elements are expected
1198
- # [Content model] Empty
1199
- #
1200
- # Represents a code block, i.e. a block of text that should be used as-is.
1201
- #
1202
- # The +value+ field has to contain the content of the code block.
1203
- #
1204
- # The option :lang specifies a highlighting language with possible HTML style options (e.g.
1205
- # php?start_inline=1) and should be used instead of a possibly also available language embedded in
1206
- # a class name of the form 'language-LANG'.
1207
- #
1208
- #
1209
- # === :ul
1210
- #
1211
- # [Category] Block-level element
1212
- # [Usage context] Where block-level elements are expected
1213
- # [Content model] One or more :li elements
1214
- #
1215
- # Represents an unordered list.
1216
- #
1217
- #
1218
- # === :ol
1219
- #
1220
- # [Category] Block-level element
1221
- # [Usage context] Where block-level elements are expected
1222
- # [Content model] One or more :li elements
1223
- #
1224
- # Represents an ordered list.
1225
- #
1226
- #
1227
- # === :li
1228
- #
1229
- # [Category] Block-level element
1230
- # [Usage context] Inside :ol and :ul elements
1231
- # [Content model] Block-level elements
1232
- #
1233
- # Represents a list item of an ordered or unordered list.
1234
- #
1235
- # Note that the first child of a list item must not be a :blank element!
1236
- #
1237
- #
1238
- # === :dl
1239
- #
1240
- # [Category] Block-level element
1241
- # [Usage context] Where block-level elements are expected
1242
- # [Content model] One or more groups each consisting of one or more :dt elements followed by one
1243
- # or more :dd elements.
1244
- #
1245
- # Represents a definition list which contains groups consisting of terms and definitions for them.
1246
- #
1247
- #
1248
- # === :dt
1249
- #
1250
- # [Category] Block-level element
1251
- # [Usage context] Before :dt or :dd elements inside a :dl elment
1252
- # [Content model] Span-level elements
1253
- #
1254
- # Represents the term part of a term-definition group in a definition list.
1255
- #
1256
- #
1257
- # === :dd
1258
- #
1259
- # [Category] Block-level element
1260
- # [Usage context] After :dt or :dd elements inside a :dl elment
1261
- # [Content model] Block-level elements
1262
- #
1263
- # Represents the definition part of a term-definition group in a definition list.
1264
- #
1265
- #
1266
- # === :hr
1267
- #
1268
- # [Category] Block-level element
1269
- # [Usage context] Where block-level elements are expected
1270
- # [Content model] None
1271
- #
1272
- # Represents a horizontal line.
1273
- #
1274
- #
1275
- # === :table
1276
- #
1277
- # [Category] Block-level element
1278
- # [Usage context] Where block-level elements are expected
1279
- # [Content model] Zero or one :thead elements, one or more :tbody elements, zero or one :tfoot
1280
- # elements
1281
- #
1282
- # Represents a table. Each table row (i.e. :tr element) of the table has to contain the same
1283
- # number of :td elements.
1284
- #
1285
- # The option :alignment has to be an array containing the alignment values, exactly one for each
1286
- # column of the table. The possible alignment values are :left, :center, :right and :default.
1287
- #
1288
- #
1289
- # === :thead
1290
- #
1291
- # [Category] None
1292
- # [Usage context] As first element inside a :table element
1293
- # [Content model] One or more :tr elements
1294
- #
1295
- # Represents the table header.
1296
- #
1297
- #
1298
- # === :tbody
1299
- #
1300
- # [Category] None
1301
- # [Usage context] After a :thead element but before a :tfoot element inside a :table element
1302
- # [Content model] One or more :tr elements
1303
- #
1304
- # Represents a table body.
1305
- #
1306
- #
1307
- # === :tfoot
1308
- #
1309
- # [Category] None
1310
- # [Usage context] As last element inside a :table element
1311
- # [Content model] One or more :tr elements
1312
- #
1313
- # Represents the table footer.
1314
- #
1315
- #
1316
- # === :tr
1317
- #
1318
- # [Category] None
1319
- # [Usage context] Inside :thead, :tbody and :tfoot elements
1320
- # [Content model] One or more :td elements
1321
- #
1322
- # Represents a table row.
1323
- #
1324
- #
1325
- # === :td
1326
- #
1327
- # [Category] Block-level element
1328
- # [Usage context] Inside :tr elements
1329
- # [Content model] As child of :thead/:tr span-level elements, as child of :tbody/:tr and
1330
- # :tfoot/:tr block-level elements
1331
- #
1332
- # Represents a table cell.
1333
- #
1334
- #
1335
- # === :math
1336
- #
1337
- # [Category] Block/span-level element
1338
- # [Usage context] Where block/span-level elements are expected
1339
- # [Content model] None
1340
- #
1341
- # Represents mathematical text that is written in LaTeX.
1342
- #
1343
- # The +value+ field has to contain the actual mathematical text.
1344
- #
1345
- # The option :category has to be set to either :span or :block depending on the context where the
1346
- # element is used.
1347
- #
1348
- #
1349
- # == Text Markup Elements
1350
- #
1351
- # === :text
1352
- #
1353
- # [Category] Span-level element
1354
- # [Usage context] Where span-level elements are expected
1355
- # [Content model] None
1356
- #
1357
- # Represents text.
1358
- #
1359
- # The +value+ field has to contain the text itself.
1360
- #
1361
- #
1362
- # === :br
1363
- #
1364
- # [Category] Span-level element
1365
- # [Usage context] Where span-level elements are expected
1366
- # [Content model] None
1367
- #
1368
- # Represents a hard line break.
1369
- #
1370
- #
1371
- # === :a
1372
- #
1373
- # [Category] Span-level element
1374
- # [Usage context] Where span-level elements are expected
1375
- # [Content model] Span-level elements
1376
- #
1377
- # Represents a link to an URL.
1378
- #
1379
- # The attribute +href+ has to be set to the URL to which the link points. The attribute +title+
1380
- # optionally contains the title of the link.
1381
- #
1382
- #
1383
- # === :img
1384
- #
1385
- # [Category] Span-level element
1386
- # [Usage context] Where span-level elements are expected
1387
- # [Content model] None
1388
- #
1389
- # Represents an image.
1390
- #
1391
- # The attribute +src+ has to be set to the URL of the image. The attribute +alt+ has to contain a
1392
- # text description of the image. The attribute +title+ optionally contains the title of the image.
1393
- #
1394
- #
1395
- # === :codespan
1396
- #
1397
- # [Category] Span-level element
1398
- # [Usage context] Where span-level elements are expected
1399
- # [Content model] None
1400
- #
1401
- # Represents verbatim text.
1402
- #
1403
- # The +value+ field has to contain the content of the code span.
1404
- #
1405
- #
1406
- # === :footnote
1407
- #
1408
- # [Category] Span-level element
1409
- # [Usage context] Where span-level elements are expected
1410
- # [Content model] None
1411
- #
1412
- # Represents a footnote marker.
1413
- #
1414
- # The +value+ field has to contain an element whose children are the content of the footnote. The
1415
- # option :name has to contain a valid and unique footnote name. A valid footnote name consists of
1416
- # a word character or a digit and then optionally followed by other word characters, digits or
1417
- # dashes.
1418
- #
1419
- #
1420
- # === :em
1421
- #
1422
- # [Category] Span-level element
1423
- # [Usage context] Where span-level elements are expected
1424
- # [Content model] Span-level elements
1425
- #
1426
- # Represents emphasis of its contents.
1427
- #
1428
- #
1429
- # === :strong
1430
- #
1431
- # [Category] Span-level element
1432
- # [Usage context] Where span-level elements are expected
1433
- # [Content model] Span-level elements
1434
- #
1435
- # Represents strong importance for its contents.
1436
- #
1437
- #
1438
- # === :entity
1439
- #
1440
- # [Category] Span-level element
1441
- # [Usage context] Where span-level elements are expected
1442
- # [Content model] None
1443
- #
1444
- # Represents an HTML entity.
1445
- #
1446
- # The +value+ field has to contain an instance of Kramdown::Utils::Entities::Entity. The option
1447
- # :original can be used to store the original representation of the entity.
1448
- #
1449
- #
1450
- # === :typographic_sym
1451
- #
1452
- # [Category] Span-level element
1453
- # [Usage context] Where span-level elements are expected
1454
- # [Content model] None
1455
- #
1456
- # Represents a typographic symbol.
1457
- #
1458
- # The +value+ field needs to contain a Symbol representing the specific typographic symbol from
1459
- # the following list:
1460
- #
1461
- # :mdash:: An mdash character (---)
1462
- # :ndash:: An ndash character (--)
1463
- # :hellip:: An ellipsis (...)
1464
- # :laquo:: A left guillemet (<<)
1465
- # :raquo:: A right guillemet (>>)
1466
- # :laquo_space:: A left guillemet with a space (<< )
1467
- # :raquo_space:: A right guillemet with a space ( >>)
1468
- #
1469
- #
1470
- # === :smart_quote
1471
- #
1472
- # [Category] Span-level element
1473
- # [Usage context] Where span-level elements are expected
1474
- # [Content model] None
1475
- #
1476
- # Represents a quotation character.
1477
- #
1478
- # The +value+ field needs to contain a Symbol representing the specific quotation character:
1479
- #
1480
- # :lsquo:: Left single quote
1481
- # :rsquo:: Right single quote
1482
- # :ldquo:: Left double quote
1483
- # :rdquo:: Right double quote
1484
- #
1485
- #
1486
- # === :abbreviation
1487
- #
1488
- # [Category] Span-level element
1489
- # [Usage context] Where span-level elements are expected
1490
- # [Content model] None
1491
- #
1492
- # Represents a text part that is an abbreviation.
1493
- #
1494
- # The +value+ field has to contain the text part that is the abbreviation. The definition of the
1495
- # abbreviation is stored in the :root element of the document.
1496
- #
1497
- #
1498
- # == Other Elements
1499
- #
1500
- # === :html_element
1501
- #
1502
- # [Category] Block/span-level element
1503
- # [Usage context] Where block/span-level elements or raw HTML elements are expected
1504
- # [Content model] Depends on the element
1505
- #
1506
- # Represents an HTML element.
1507
- #
1508
- # The +value+ field has to contain the name of the HTML element the element is representing.
1509
- #
1510
- # The option :category has to be set to either :span or :block depending on the whether the
1511
- # element is a block-level or a span-level element. The option :content_model has to be set to the
1512
- # content model for the element (either :block if it contains block-level elements, :span if it
1513
- # contains span-level elements or :raw if it contains raw content).
1514
- #
1515
- #
1516
- # === :xml_comment
1517
- #
1518
- # [Category] Block/span-level element
1519
- # [Usage context] Where block/span-level elements are expected or in raw HTML elements
1520
- # [Content model] None
1521
- #
1522
- # Represents an XML/HTML comment.
1523
- #
1524
- # The +value+ field has to contain the whole XML/HTML comment including the delimiters.
1525
- #
1526
- # The option :category has to be set to either :span or :block depending on the context where the
1527
- # element is used.
1528
- #
1529
- #
1530
- # === :xml_pi
1531
- #
1532
- # [Category] Block/span-level element
1533
- # [Usage context] Where block/span-level elements are expected or in raw HTML elements
1534
- # [Content model] None
1535
- #
1536
- # Represents an XML/HTML processing instruction.
1537
- #
1538
- # The +value+ field has to contain the whole XML/HTML processing instruction including the
1539
- # delimiters.
1540
- #
1541
- # The option :category has to be set to either :span or :block depending on the context where the
1542
- # element is used.
1543
- #
1544
- #
1545
- # === :comment
1546
- #
1547
- # [Category] Block/span-level element
1548
- # [Usage context] Where block/span-level elements are expected
1549
- # [Content model] None
1550
- #
1551
- # Represents a comment.
1552
- #
1553
- # The +value+ field has to contain the comment.
1554
- #
1555
- # The option :category has to be set to either :span or :block depending on the context where the
1556
- # element is used. If it is set to :span, then no blank lines are allowed in the comment.
1557
- #
1558
- #
1559
- # === :raw
1560
- #
1561
- # [Category] Block/span-level element
1562
- # [Usage context] Where block/span-level elements are expected
1563
- # [Content model] None
1564
- #
1565
- # Represents a raw string that should not be modified. For example, the element could contain some
1566
- # HTML code that should be output as-is without modification and escaping.
1567
- #
1568
- # The +value+ field has to contain the actual raw text.
1569
- #
1570
- # The option :category has to be set to either :span or :block depending on the context where the
1571
- # element is used. If it is set to :span, then no blank lines are allowed in the raw text.
1572
- #
1573
- # The option :type can be set to an array of strings to define for which converters the raw string
1574
- # is valid.
1575
- #
1576
- # source://kramdown-2.4.0/lib/kramdown/element.rb:482
1577
- class Kramdown::Element
1578
- # Create a new Element object of type +type+. The optional parameters +value+, +attr+ and
1579
- # +options+ can also be set in this constructor for convenience.
1580
- #
1581
- # @return [Element] a new instance of Element
1582
- #
1583
- # source://kramdown-2.4.0/lib/kramdown/element.rb:496
1584
- def initialize(type, value = T.unsafe(nil), attr = T.unsafe(nil), options = T.unsafe(nil)); end
1585
-
1586
- # The attributes of the element.
1587
- #
1588
- # source://kramdown-2.4.0/lib/kramdown/element.rb:502
1589
- def attr; end
1590
-
1591
- # syntactic sugar to simplify calls such as +Kramdown::Element.category(el) == :block+ with
1592
- # +el.block?+.
1593
- #
1594
- # Returns boolean true or false.
1595
- #
1596
- # @return [Boolean]
1597
- #
1598
- # source://kramdown-2.4.0/lib/kramdown/element.rb:537
1599
- def block?; end
1600
-
1601
- # The child elements of this element.
1602
- #
1603
- # source://kramdown-2.4.0/lib/kramdown/element.rb:492
1604
- def children; end
1605
-
1606
- # The child elements of this element.
1607
- #
1608
- # source://kramdown-2.4.0/lib/kramdown/element.rb:492
1609
- def children=(_arg0); end
1610
-
1611
- # source://kramdown-2.4.0/lib/kramdown/element.rb:511
1612
- def inspect; end
1613
-
1614
- # The options hash for the element. It is used for storing arbitray options.
1615
- #
1616
- # source://kramdown-2.4.0/lib/kramdown/element.rb:507
1617
- def options; end
1618
-
1619
- # syntactic sugar to simplify calls such as +Kramdown::Element.category(el) == :span+ with
1620
- # +el.span?+.
1621
- #
1622
- # Returns boolean true or false.
1623
- #
1624
- # @return [Boolean]
1625
- #
1626
- # source://kramdown-2.4.0/lib/kramdown/element.rb:545
1627
- def span?; end
1628
-
1629
- # A symbol representing the element type. For example, :p or :blockquote.
1630
- #
1631
- # source://kramdown-2.4.0/lib/kramdown/element.rb:485
1632
- def type; end
1633
-
1634
- # A symbol representing the element type. For example, :p or :blockquote.
1635
- #
1636
- # source://kramdown-2.4.0/lib/kramdown/element.rb:485
1637
- def type=(_arg0); end
1638
-
1639
- # The value of the element. The interpretation of this field depends on the type of the element.
1640
- # Many elements don't use this field.
1641
- #
1642
- # source://kramdown-2.4.0/lib/kramdown/element.rb:489
1643
- def value; end
1644
-
1645
- # The value of the element. The interpretation of this field depends on the type of the element.
1646
- # Many elements don't use this field.
1647
- #
1648
- # source://kramdown-2.4.0/lib/kramdown/element.rb:489
1649
- def value=(_arg0); end
1650
-
1651
- class << self
1652
- # Return the category of +el+ which can be :block, :span or +nil+.
1653
- #
1654
- # Most elements have a fixed category, however, some elements can either appear in a block-level
1655
- # or a span-level context. These elements need to have the option :category correctly set.
1656
- #
1657
- # source://kramdown-2.4.0/lib/kramdown/element.rb:529
1658
- def category(el); end
1659
- end
1660
- end
1661
-
1662
- # source://kramdown-2.4.0/lib/kramdown/element.rb:519
1663
- Kramdown::Element::CATEGORY = T.let(T.unsafe(nil), Hash)
1664
-
1665
- # This error is raised when an error condition is encountered.
1666
- #
1667
- # *Note* that this error is only raised by the support framework for the parsers and converters.
1668
- #
1669
- # source://kramdown-2.4.0/lib/kramdown/error.rb:15
1670
- class Kramdown::Error < ::RuntimeError; end
1671
-
1672
- # This module defines all options that are used by parsers and/or converters as well as providing
1673
- # methods to deal with the options.
1674
- #
1675
- # source://kramdown-2.4.0/lib/kramdown/options.rb:16
1676
- module Kramdown::Options
1677
- class << self
1678
- # Return a Hash with the default values for all options.
1679
- #
1680
- # source://kramdown-2.4.0/lib/kramdown/options.rb:72
1681
- def defaults; end
1682
-
1683
- # Define a new option called +name+ (a Symbol) with the given +type+ (String, Integer, Float,
1684
- # Symbol, Boolean, Object), default value +default+ and the description +desc+. If a block is
1685
- # specified, it should validate the value and either raise an error or return a valid value.
1686
- #
1687
- # The type 'Object' should only be used for complex types for which none of the other types
1688
- # suffices. A block needs to be specified when using type 'Object' and it has to cope with
1689
- # a value given as string and as the opaque type.
1690
- #
1691
- # @raise [ArgumentError]
1692
- #
1693
- # source://kramdown-2.4.0/lib/kramdown/options.rb:51
1694
- def define(name, type, default, desc, &block); end
1695
-
1696
- # Return +true+ if an option called +name+ is defined.
1697
- #
1698
- # @return [Boolean]
1699
- #
1700
- # source://kramdown-2.4.0/lib/kramdown/options.rb:67
1701
- def defined?(name); end
1702
-
1703
- # Return all option definitions.
1704
- #
1705
- # source://kramdown-2.4.0/lib/kramdown/options.rb:62
1706
- def definitions; end
1707
-
1708
- # Merge the #defaults Hash with the *parsed* options from the given Hash, i.e. only valid option
1709
- # names are considered and their value is run through the #parse method.
1710
- #
1711
- # source://kramdown-2.4.0/lib/kramdown/options.rb:82
1712
- def merge(hash); end
1713
-
1714
- # Parse the given value +data+ as if it was a value for the option +name+ and return the parsed
1715
- # value with the correct type.
1716
- #
1717
- # If +data+ already has the correct type, it is just returned. Otherwise it is converted to a
1718
- # String and then to the correct type.
1719
- #
1720
- # @raise [ArgumentError]
1721
- #
1722
- # source://kramdown-2.4.0/lib/kramdown/options.rb:96
1723
- def parse(name, data); end
1724
-
1725
- # Ensures that the option value +val+ for the option called +name+ is a valid array. The
1726
- # parameter +val+ can be
1727
- #
1728
- # - a comma separated string which is split into an array of values
1729
- # - or an array.
1730
- #
1731
- # Optionally, the array is checked for the correct size.
1732
- #
1733
- # source://kramdown-2.4.0/lib/kramdown/options.rb:141
1734
- def simple_array_validator(val, name, size = T.unsafe(nil)); end
1735
-
1736
- # Ensures that the option value +val+ for the option called +name+ is a valid hash. The
1737
- # parameter +val+ can be
1738
- #
1739
- # - a hash in YAML format
1740
- # - or a Ruby Hash object.
1741
- #
1742
- # @raise [Kramdown::Error]
1743
- #
1744
- # source://kramdown-2.4.0/lib/kramdown/options.rb:158
1745
- def simple_hash_validator(val, name); end
1746
-
1747
- # Converts the given String +data+ into a Symbol or +nil+ with the
1748
- # following provisions:
1749
- #
1750
- # - A leading colon is stripped from the string.
1751
- # - An empty value or a value equal to "nil" results in +nil+.
1752
- #
1753
- # source://kramdown-2.4.0/lib/kramdown/options.rb:122
1754
- def str_to_sym(data); end
1755
- end
1756
- end
1757
-
1758
- # Allowed option types.
1759
- #
1760
- # source://kramdown-2.4.0/lib/kramdown/options.rb:39
1761
- Kramdown::Options::ALLOWED_TYPES = T.let(T.unsafe(nil), Array)
1762
-
1763
- # Helper class introducing a boolean type for specifying boolean values (+true+ and +false+) as
1764
- # option types.
1765
- #
1766
- # source://kramdown-2.4.0/lib/kramdown/options.rb:20
1767
- class Kramdown::Options::Boolean
1768
- class << self
1769
- # Return +true+ if +other+ is either +true+ or +false+
1770
- #
1771
- # source://kramdown-2.4.0/lib/kramdown/options.rb:23
1772
- def ===(other); end
1773
- end
1774
- end
1775
-
1776
- # Struct class for storing the definition of an option.
1777
- #
1778
- # source://kramdown-2.4.0/lib/kramdown/options.rb:36
1779
- class Kramdown::Options::Definition < ::Struct
1780
- # Returns the value of attribute default
1781
- #
1782
- # @return [Object] the current value of default
1783
- def default; end
1784
-
1785
- # Sets the attribute default
1786
- #
1787
- # @param value [Object] the value to set the attribute default to.
1788
- # @return [Object] the newly set value
1789
- def default=(_); end
1790
-
1791
- # Returns the value of attribute desc
1792
- #
1793
- # @return [Object] the current value of desc
1794
- def desc; end
1795
-
1796
- # Sets the attribute desc
1797
- #
1798
- # @param value [Object] the value to set the attribute desc to.
1799
- # @return [Object] the newly set value
1800
- def desc=(_); end
1801
-
1802
- # Returns the value of attribute name
1803
- #
1804
- # @return [Object] the current value of name
1805
- def name; end
1806
-
1807
- # Sets the attribute name
1808
- #
1809
- # @param value [Object] the value to set the attribute name to.
1810
- # @return [Object] the newly set value
1811
- def name=(_); end
1812
-
1813
- # Returns the value of attribute type
1814
- #
1815
- # @return [Object] the current value of type
1816
- def type; end
1817
-
1818
- # Sets the attribute type
1819
- #
1820
- # @param value [Object] the value to set the attribute type to.
1821
- # @return [Object] the newly set value
1822
- def type=(_); end
1823
-
1824
- # Returns the value of attribute validator
1825
- #
1826
- # @return [Object] the current value of validator
1827
- def validator; end
1828
-
1829
- # Sets the attribute validator
1830
- #
1831
- # @param value [Object] the value to set the attribute validator to.
1832
- # @return [Object] the newly set value
1833
- def validator=(_); end
1834
-
1835
- class << self
1836
- def [](*_arg0); end
1837
- def inspect; end
1838
- def keyword_init?; end
1839
- def members; end
1840
- def new(*_arg0); end
1841
- end
1842
- end
1843
-
1844
- # source://kramdown-2.4.0/lib/kramdown/options.rb:396
1845
- Kramdown::Options::SMART_QUOTES_ENTITIES = T.let(T.unsafe(nil), Array)
1846
-
1847
- # source://kramdown-2.4.0/lib/kramdown/options.rb:397
1848
- Kramdown::Options::SMART_QUOTES_STR = T.let(T.unsafe(nil), String)
1849
-
1850
- # source://kramdown-2.4.0/lib/kramdown/options.rb:336
1851
- Kramdown::Options::TOC_LEVELS_ARRAY = T.let(T.unsafe(nil), Array)
1852
-
1853
- # source://kramdown-2.4.0/lib/kramdown/options.rb:335
1854
- Kramdown::Options::TOC_LEVELS_RANGE = T.let(T.unsafe(nil), Range)
1855
-
1856
- # This module contains all available parsers. A parser takes an input string and converts the
1857
- # string to an element tree.
1858
- #
1859
- # New parsers should be derived from the Base class which provides common functionality - see its
1860
- # API documentation for how to create a custom converter class.
1861
- #
1862
- # source://kramdown-2.4.0/lib/kramdown/parser.rb:17
1863
- module Kramdown::Parser; end
1864
-
1865
- # == \Base class for parsers
1866
- #
1867
- # This class serves as base class for parsers. It provides common methods that can/should be
1868
- # used by all parsers, especially by those using StringScanner(Kramdown) for parsing.
1869
- #
1870
- # A parser object is used as a throw-away object, i.e. it is only used for storing the needed
1871
- # state information during parsing. Therefore one can't instantiate a parser object directly but
1872
- # only use the Base::parse method.
1873
- #
1874
- # == Implementing a parser
1875
- #
1876
- # Implementing a new parser is rather easy: just derive a new class from this class and put it
1877
- # in the Kramdown::Parser module -- the latter is needed so that the auto-detection of the new
1878
- # parser works correctly. Then you need to implement the +#parse+ method which has to contain
1879
- # the parsing code.
1880
- #
1881
- # Have a look at the Base::parse, Base::new and Base#parse methods for additional information!
1882
- #
1883
- # source://kramdown-2.4.0/lib/kramdown/parser/base.rb:34
1884
- class Kramdown::Parser::Base
1885
- # Initialize the parser object with the +source+ string and the parsing +options+.
1886
- #
1887
- # The @root element, the @warnings array and @text_type (specifies the default type for newly
1888
- # created text nodes) are automatically initialized.
1889
- #
1890
- # @return [Base] a new instance of Base
1891
- #
1892
- # source://kramdown-2.4.0/lib/kramdown/parser/base.rb:52
1893
- def initialize(source, options); end
1894
-
1895
- # Modify the string +source+ to be usable by the parser (unifies line ending characters to
1896
- # +\n+ and makes sure +source+ ends with a new line character).
1897
- #
1898
- # source://kramdown-2.4.0/lib/kramdown/parser/base.rb:91
1899
- def adapt_source(source); end
1900
-
1901
- # This helper method adds the given +text+ either to the last element in the +tree+ if it is a
1902
- # +type+ element or creates a new text element with the given +type+.
1903
- #
1904
- # source://kramdown-2.4.0/lib/kramdown/parser/base.rb:103
1905
- def add_text(text, tree = T.unsafe(nil), type = T.unsafe(nil)); end
1906
-
1907
- # Extract the part of the StringScanner +strscan+ backed string specified by the +range+. This
1908
- # method works correctly under Ruby 1.8 and Ruby 1.9.
1909
- #
1910
- # source://kramdown-2.4.0/lib/kramdown/parser/base.rb:115
1911
- def extract_string(range, strscan); end
1912
-
1913
- # The hash with the parsing options.
1914
- #
1915
- # source://kramdown-2.4.0/lib/kramdown/parser/base.rb:37
1916
- def options; end
1917
-
1918
- # Parse the source string into an element tree.
1919
- #
1920
- # The parsing code should parse the source provided in @source and build an element tree the
1921
- # root of which should be @root.
1922
- #
1923
- # This is the only method that has to be implemented by sub-classes!
1924
- #
1925
- # @raise [NotImplementedError]
1926
- #
1927
- # source://kramdown-2.4.0/lib/kramdown/parser/base.rb:79
1928
- def parse; end
1929
-
1930
- # The root element of element tree that is created from the source string.
1931
- #
1932
- # source://kramdown-2.4.0/lib/kramdown/parser/base.rb:46
1933
- def root; end
1934
-
1935
- # The original source string.
1936
- #
1937
- # source://kramdown-2.4.0/lib/kramdown/parser/base.rb:43
1938
- def source; end
1939
-
1940
- # Add the given warning +text+ to the warning array.
1941
- #
1942
- # source://kramdown-2.4.0/lib/kramdown/parser/base.rb:84
1943
- def warning(text); end
1944
-
1945
- # The array with the parser warnings.
1946
- #
1947
- # source://kramdown-2.4.0/lib/kramdown/parser/base.rb:40
1948
- def warnings; end
1949
-
1950
- class << self
1951
- # Parse the +source+ string into an element tree, possibly using the parsing +options+, and
1952
- # return the root element of the element tree and an array with warning messages.
1953
- #
1954
- # Initializes a new instance of the calling class and then calls the +#parse+ method that must
1955
- # be implemented by each subclass.
1956
- #
1957
- # source://kramdown-2.4.0/lib/kramdown/parser/base.rb:67
1958
- def parse(source, options = T.unsafe(nil)); end
1959
- end
1960
- end
1961
-
1962
- # Used for parsing an HTML document.
1963
- #
1964
- # The parsing code is in the Parser module that can also be used by other parsers.
1965
- #
1966
- # source://kramdown-2.4.0/lib/kramdown/parser/html.rb:22
1967
- class Kramdown::Parser::Html < ::Kramdown::Parser::Base
1968
- include ::Kramdown::Parser::Html::Constants
1969
- include ::Kramdown::Parser::Html::Parser
1970
-
1971
- # Parse the source string provided on initialization as HTML document.
1972
- #
1973
- # source://kramdown-2.4.0/lib/kramdown/parser/html.rb:586
1974
- def parse; end
1975
- end
1976
-
1977
- # Contains all constants that are used when parsing.
1978
- #
1979
- # source://kramdown-2.4.0/lib/kramdown/parser/html.rb:25
1980
- module Kramdown::Parser::Html::Constants; end
1981
-
1982
- # source://kramdown-2.4.0/lib/kramdown/parser/html.rb:32
1983
- Kramdown::Parser::Html::Constants::HTML_ATTRIBUTE_RE = T.let(T.unsafe(nil), Regexp)
1984
-
1985
- # source://kramdown-2.4.0/lib/kramdown/parser/html.rb:59
1986
- Kramdown::Parser::Html::Constants::HTML_BLOCK_ELEMENTS = T.let(T.unsafe(nil), Array)
1987
-
1988
- # source://kramdown-2.4.0/lib/kramdown/parser/html.rb:30
1989
- Kramdown::Parser::Html::Constants::HTML_COMMENT_RE = T.let(T.unsafe(nil), Regexp)
1990
-
1991
- # The following elements are also parsed as raw since they need child elements that cannot
1992
- # be expressed using kramdown syntax: colgroup table tbody thead tfoot tr ul ol
1993
- #
1994
- # source://kramdown-2.4.0/lib/kramdown/parser/html.rb:48
1995
- Kramdown::Parser::Html::Constants::HTML_CONTENT_MODEL = T.let(T.unsafe(nil), Hash)
1996
-
1997
- # source://kramdown-2.4.0/lib/kramdown/parser/html.rb:37
1998
- Kramdown::Parser::Html::Constants::HTML_CONTENT_MODEL_BLOCK = T.let(T.unsafe(nil), Array)
1999
-
2000
- # source://kramdown-2.4.0/lib/kramdown/parser/html.rb:44
2001
- Kramdown::Parser::Html::Constants::HTML_CONTENT_MODEL_RAW = T.let(T.unsafe(nil), Array)
2002
-
2003
- # source://kramdown-2.4.0/lib/kramdown/parser/html.rb:41
2004
- Kramdown::Parser::Html::Constants::HTML_CONTENT_MODEL_SPAN = T.let(T.unsafe(nil), Array)
2005
-
2006
- # :stopdoc:
2007
- # The following regexps are based on the ones used by REXML, with some slight modifications.
2008
- #
2009
- # source://kramdown-2.4.0/lib/kramdown/parser/html.rb:29
2010
- Kramdown::Parser::Html::Constants::HTML_DOCTYPE_RE = T.let(T.unsafe(nil), Regexp)
2011
-
2012
- # source://kramdown-2.4.0/lib/kramdown/parser/html.rb:66
2013
- Kramdown::Parser::Html::Constants::HTML_ELEMENT = T.let(T.unsafe(nil), Hash)
2014
-
2015
- # source://kramdown-2.4.0/lib/kramdown/parser/html.rb:63
2016
- Kramdown::Parser::Html::Constants::HTML_ELEMENTS_WITHOUT_BODY = T.let(T.unsafe(nil), Array)
2017
-
2018
- # source://kramdown-2.4.0/lib/kramdown/parser/html.rb:35
2019
- Kramdown::Parser::Html::Constants::HTML_ENTITY_RE = T.let(T.unsafe(nil), Regexp)
2020
-
2021
- # source://kramdown-2.4.0/lib/kramdown/parser/html.rb:31
2022
- Kramdown::Parser::Html::Constants::HTML_INSTRUCTION_RE = T.let(T.unsafe(nil), Regexp)
2023
-
2024
- # Some HTML elements like script belong to both categories (i.e. are valid in block and
2025
- # span HTML) and don't appear therefore!
2026
- # script, textarea
2027
- #
2028
- # source://kramdown-2.4.0/lib/kramdown/parser/html.rb:56
2029
- Kramdown::Parser::Html::Constants::HTML_SPAN_ELEMENTS = T.let(T.unsafe(nil), Array)
2030
-
2031
- # source://kramdown-2.4.0/lib/kramdown/parser/html.rb:34
2032
- Kramdown::Parser::Html::Constants::HTML_TAG_CLOSE_RE = T.let(T.unsafe(nil), Regexp)
2033
-
2034
- # source://kramdown-2.4.0/lib/kramdown/parser/html.rb:33
2035
- Kramdown::Parser::Html::Constants::HTML_TAG_RE = T.let(T.unsafe(nil), Regexp)
2036
-
2037
- # Converts HTML elements to native elements if possible.
2038
- #
2039
- # source://kramdown-2.4.0/lib/kramdown/parser/html.rb:197
2040
- class Kramdown::Parser::Html::ElementConverter
2041
- include ::Kramdown::Parser::Html::Constants
2042
- include ::Kramdown::Utils::Entities
2043
-
2044
- # @return [ElementConverter] a new instance of ElementConverter
2045
- #
2046
- # source://kramdown-2.4.0/lib/kramdown/parser/html.rb:216
2047
- def initialize(root); end
2048
-
2049
- # source://kramdown-2.4.0/lib/kramdown/parser/html.rb:384
2050
- def convert_a(el); end
2051
-
2052
- # source://kramdown-2.4.0/lib/kramdown/parser/html.rb:394
2053
- def convert_b(el); end
2054
-
2055
- # source://kramdown-2.4.0/lib/kramdown/parser/html.rb:417
2056
- def convert_code(el); end
2057
-
2058
- # source://kramdown-2.4.0/lib/kramdown/parser/html.rb:394
2059
- def convert_em(el); end
2060
-
2061
- # source://kramdown-2.4.0/lib/kramdown/parser/html.rb:408
2062
- def convert_h1(el); end
2063
-
2064
- # source://kramdown-2.4.0/lib/kramdown/parser/html.rb:408
2065
- def convert_h2(el); end
2066
-
2067
- # source://kramdown-2.4.0/lib/kramdown/parser/html.rb:408
2068
- def convert_h3(el); end
2069
-
2070
- # source://kramdown-2.4.0/lib/kramdown/parser/html.rb:408
2071
- def convert_h4(el); end
2072
-
2073
- # source://kramdown-2.4.0/lib/kramdown/parser/html.rb:408
2074
- def convert_h5(el); end
2075
-
2076
- # source://kramdown-2.4.0/lib/kramdown/parser/html.rb:408
2077
- def convert_h6(el); end
2078
-
2079
- # source://kramdown-2.4.0/lib/kramdown/parser/html.rb:394
2080
- def convert_i(el); end
2081
-
2082
- # source://kramdown-2.4.0/lib/kramdown/parser/html.rb:417
2083
- def convert_pre(el); end
2084
-
2085
- # source://kramdown-2.4.0/lib/kramdown/parser/html.rb:563
2086
- def convert_script(el); end
2087
-
2088
- # source://kramdown-2.4.0/lib/kramdown/parser/html.rb:394
2089
- def convert_strong(el); end
2090
-
2091
- # source://kramdown-2.4.0/lib/kramdown/parser/html.rb:460
2092
- def convert_table(el); end
2093
-
2094
- # source://kramdown-2.4.0/lib/kramdown/parser/html.rb:380
2095
- def convert_textarea(el); end
2096
-
2097
- # source://kramdown-2.4.0/lib/kramdown/parser/html.rb:375
2098
- def extract_text(el, raw); end
2099
-
2100
- # source://kramdown-2.4.0/lib/kramdown/parser/html.rb:575
2101
- def handle_math_tag(el); end
2102
-
2103
- # @return [Boolean]
2104
- #
2105
- # source://kramdown-2.4.0/lib/kramdown/parser/html.rb:571
2106
- def is_math_tag?(el); end
2107
-
2108
- # @return [Boolean]
2109
- #
2110
- # source://kramdown-2.4.0/lib/kramdown/parser/html.rb:503
2111
- def is_simple_table?(el); end
2112
-
2113
- # Convert the element +el+ and its children.
2114
- #
2115
- # source://kramdown-2.4.0/lib/kramdown/parser/html.rb:225
2116
- def process(el, do_conversion = T.unsafe(nil), preserve_text = T.unsafe(nil), parent = T.unsafe(nil)); end
2117
-
2118
- # source://kramdown-2.4.0/lib/kramdown/parser/html.rb:278
2119
- def process_children(el, do_conversion = T.unsafe(nil), preserve_text = T.unsafe(nil)); end
2120
-
2121
- # source://kramdown-2.4.0/lib/kramdown/parser/html.rb:320
2122
- def process_html_element(el, do_conversion = T.unsafe(nil), preserve_text = T.unsafe(nil)); end
2123
-
2124
- # Process the HTML text +raw+: compress whitespace (if +preserve+ is +false+) and convert
2125
- # entities in entity elements.
2126
- #
2127
- # source://kramdown-2.4.0/lib/kramdown/parser/html.rb:291
2128
- def process_text(raw, preserve = T.unsafe(nil)); end
2129
-
2130
- # source://kramdown-2.4.0/lib/kramdown/parser/html.rb:326
2131
- def remove_text_children(el); end
2132
-
2133
- # source://kramdown-2.4.0/lib/kramdown/parser/html.rb:359
2134
- def remove_whitespace_children(el); end
2135
-
2136
- # source://kramdown-2.4.0/lib/kramdown/parser/html.rb:369
2137
- def set_basics(el, type, opts = T.unsafe(nil)); end
2138
-
2139
- # source://kramdown-2.4.0/lib/kramdown/parser/html.rb:349
2140
- def strip_whitespace(el); end
2141
-
2142
- # source://kramdown-2.4.0/lib/kramdown/parser/html.rb:330
2143
- def wrap_text_children(el); end
2144
-
2145
- class << self
2146
- # source://kramdown-2.4.0/lib/kramdown/parser/html.rb:220
2147
- def convert(root, el = T.unsafe(nil)); end
2148
- end
2149
- end
2150
-
2151
- # source://kramdown-2.4.0/lib/kramdown/parser/html.rb:393
2152
- Kramdown::Parser::Html::ElementConverter::EMPHASIS_TYPE_MAP = T.let(T.unsafe(nil), Hash)
2153
-
2154
- # source://kramdown-2.4.0/lib/kramdown/parser/html.rb:204
2155
- Kramdown::Parser::Html::ElementConverter::REMOVE_TEXT_CHILDREN = T.let(T.unsafe(nil), Array)
2156
-
2157
- # source://kramdown-2.4.0/lib/kramdown/parser/html.rb:208
2158
- Kramdown::Parser::Html::ElementConverter::REMOVE_WHITESPACE_CHILDREN = T.let(T.unsafe(nil), Array)
2159
-
2160
- # source://kramdown-2.4.0/lib/kramdown/parser/html.rb:213
2161
- Kramdown::Parser::Html::ElementConverter::SIMPLE_ELEMENTS = T.let(T.unsafe(nil), Array)
2162
-
2163
- # source://kramdown-2.4.0/lib/kramdown/parser/html.rb:210
2164
- Kramdown::Parser::Html::ElementConverter::STRIP_WHITESPACE = T.let(T.unsafe(nil), Array)
2165
-
2166
- # source://kramdown-2.4.0/lib/kramdown/parser/html.rb:206
2167
- Kramdown::Parser::Html::ElementConverter::WRAP_TEXT_CHILDREN = T.let(T.unsafe(nil), Array)
2168
-
2169
- # Contains the parsing methods. This module can be mixed into any parser to get HTML parsing
2170
- # functionality. The only thing that must be provided by the class are instance variable
2171
- # parsing.
2172
- #
2173
- # source://kramdown-2.4.0/lib/kramdown/parser/html.rb:77
2174
- module Kramdown::Parser::Html::Parser
2175
- include ::Kramdown::Parser::Html::Constants
2176
-
2177
- # Process the HTML start tag that has already be scanned/checked via @src.
2178
- #
2179
- # Does the common processing steps and then yields to the caller for further processing
2180
- # (first parameter is the created element; the second parameter is +true+ if the HTML
2181
- # element is already closed, ie. contains no body; the third parameter specifies whether the
2182
- # body - and the end tag - need to be handled in case closed=false).
2183
- #
2184
- # source://kramdown-2.4.0/lib/kramdown/parser/html.rb:87
2185
- def handle_html_start_tag(line = T.unsafe(nil)); end
2186
-
2187
- # Handle the raw HTML tag at the current position.
2188
- #
2189
- # source://kramdown-2.4.0/lib/kramdown/parser/html.rb:127
2190
- def handle_raw_html_tag(name); end
2191
-
2192
- # Parses the given string for HTML attributes and returns the resulting hash.
2193
- #
2194
- # If the optional +line+ parameter is supplied, it is used in warning messages.
2195
- #
2196
- # If the optional +in_html_tag+ parameter is set to +false+, attributes are not modified to
2197
- # contain only lowercase letters.
2198
- #
2199
- # source://kramdown-2.4.0/lib/kramdown/parser/html.rb:114
2200
- def parse_html_attributes(str, line = T.unsafe(nil), in_html_tag = T.unsafe(nil)); end
2201
-
2202
- # Parse raw HTML from the current source position, storing the found elements in +el+.
2203
- # Parsing continues until one of the following criteria are fulfilled:
2204
- #
2205
- # - The end of the document is reached.
2206
- # - The matching end tag for the element +el+ is found (only used if +el+ is an HTML
2207
- # element).
2208
- #
2209
- # When an HTML start tag is found, processing is deferred to #handle_html_start_tag,
2210
- # providing the block given to this method.
2211
- #
2212
- # source://kramdown-2.4.0/lib/kramdown/parser/html.rb:150
2213
- def parse_raw_html(el, &block); end
2214
- end
2215
-
2216
- # source://kramdown-2.4.0/lib/kramdown/parser/html.rb:139
2217
- Kramdown::Parser::Html::Parser::HTML_RAW_START = T.let(T.unsafe(nil), Regexp)
2218
-
2219
- # Used for parsing a document in kramdown format.
2220
- #
2221
- # If you want to extend the functionality of the parser, you need to do the following:
2222
- #
2223
- # * Create a new subclass
2224
- # * add the needed parser methods
2225
- # * modify the @block_parsers and @span_parsers variables and add the names of your parser
2226
- # methods
2227
- #
2228
- # Here is a small example for an extended parser class that parses ERB style tags as raw text if
2229
- # they are used as span-level elements (an equivalent block-level parser should probably also be
2230
- # made to handle the block case):
2231
- #
2232
- # require 'kramdown/parser/kramdown'
2233
- #
2234
- # class Kramdown::Parser::ERBKramdown < Kramdown::Parser::Kramdown
2235
- #
2236
- # def initialize(source, options)
2237
- # super
2238
- # @span_parsers.unshift(:erb_tags)
2239
- # end
2240
- #
2241
- # ERB_TAGS_START = /<%.*?%>/
2242
- #
2243
- # def parse_erb_tags
2244
- # @src.pos += @src.matched_size
2245
- # @tree.children << Element.new(:raw, @src.matched)
2246
- # end
2247
- # define_parser(:erb_tags, ERB_TAGS_START, '<%')
2248
- #
2249
- # end
2250
- #
2251
- # The new parser can be used like this:
2252
- #
2253
- # require 'kramdown/document'
2254
- # # require the file with the above parser class
2255
- #
2256
- # Kramdown::Document.new(input_text, :input => 'ERBKramdown').to_html
2257
- #
2258
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown.rb:60
2259
- class Kramdown::Parser::Kramdown < ::Kramdown::Parser::Base
2260
- include ::Kramdown
2261
- include ::Kramdown::Parser::Html::Constants
2262
- include ::Kramdown::Parser::Html::Parser
2263
-
2264
- # Create a new Kramdown parser object with the given +options+.
2265
- #
2266
- # @return [Kramdown] a new instance of Kramdown
2267
- #
2268
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown.rb:65
2269
- def initialize(source, options); end
2270
-
2271
- # This helper methods adds the approriate attributes to the element +el+ of type +a+ or +img+
2272
- # and the element itself to the @tree.
2273
- #
2274
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/link.rb:39
2275
- def add_link(el, href, title, alt_text = T.unsafe(nil), ial = T.unsafe(nil)); end
2276
-
2277
- # Return +true+ if we are after a block boundary.
2278
- #
2279
- # @return [Boolean]
2280
- #
2281
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/block_boundary.rb:21
2282
- def after_block_boundary?; end
2283
-
2284
- # Return +true+ if we are before a block boundary.
2285
- #
2286
- # @return [Boolean]
2287
- #
2288
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/block_boundary.rb:28
2289
- def before_block_boundary?; end
2290
-
2291
- # Correct abbreviation attributes.
2292
- #
2293
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/abbreviation.rb:34
2294
- def correct_abbreviations_attributes; end
2295
-
2296
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/extensions.rb:96
2297
- def handle_extension(name, opts, body, type, line_no = T.unsafe(nil)); end
2298
-
2299
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/html.rb:25
2300
- def handle_kramdown_html_tag(el, closed, handle_body); end
2301
-
2302
- # Normalize the link identifier.
2303
- #
2304
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/link.rb:17
2305
- def normalize_link_id(id); end
2306
-
2307
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/paragraph.rb:56
2308
- def paragraph_end; end
2309
-
2310
- # The source string provided on initialization is parsed into the @root element.
2311
- #
2312
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown.rb:88
2313
- def parse; end
2314
-
2315
- # Parse the link definition at the current location.
2316
- #
2317
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/abbreviation.rb:17
2318
- def parse_abbrev_definition; end
2319
-
2320
- # Parse the string +str+ and extract all attributes and add all found attributes to the hash
2321
- # +opts+.
2322
- #
2323
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/extensions.rb:18
2324
- def parse_attribute_list(str, opts); end
2325
-
2326
- # Parse the Atx header at the current location.
2327
- #
2328
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/header.rb:32
2329
- def parse_atx_header; end
2330
-
2331
- # Parse the autolink at the current location.
2332
- #
2333
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/autolink.rb:19
2334
- def parse_autolink; end
2335
-
2336
- # Parse the blank line at the current postition.
2337
- #
2338
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/blank_line.rb:17
2339
- def parse_blank_line; end
2340
-
2341
- # Parse one of the block extensions (ALD, block IAL or generic extension) at the current
2342
- # location.
2343
- #
2344
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/extensions.rb:164
2345
- def parse_block_extensions; end
2346
-
2347
- # Parse the HTML at the current position as block-level HTML.
2348
- #
2349
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/html.rb:71
2350
- def parse_block_html; end
2351
-
2352
- # Parse the math block at the current location.
2353
- #
2354
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/math.rb:19
2355
- def parse_block_math; end
2356
-
2357
- # Parse the blockquote at the current location.
2358
- #
2359
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/blockquote.rb:21
2360
- def parse_blockquote; end
2361
-
2362
- # Parse the indented codeblock at the current location.
2363
- #
2364
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/codeblock.rb:23
2365
- def parse_codeblock; end
2366
-
2367
- # Parse the fenced codeblock at the current location.
2368
- #
2369
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/codeblock.rb:37
2370
- def parse_codeblock_fenced; end
2371
-
2372
- # Parse the codespan at the current scanner location.
2373
- #
2374
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/codespan.rb:17
2375
- def parse_codespan; end
2376
-
2377
- # Parse the ordered or unordered list at the current location.
2378
- #
2379
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/list.rb:153
2380
- def parse_definition_list; end
2381
-
2382
- # Parse the emphasis at the current location.
2383
- #
2384
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/emphasis.rb:17
2385
- def parse_emphasis; end
2386
-
2387
- # Parse the EOB marker at the current location.
2388
- #
2389
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/eob.rb:17
2390
- def parse_eob_marker; end
2391
-
2392
- # Parse the backslash-escaped character at the current location.
2393
- #
2394
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/escaped_chars.rb:17
2395
- def parse_escaped_chars; end
2396
-
2397
- # Parse the generic extension at the current point. The parameter +type+ can either be :block
2398
- # or :span depending whether we parse a block or span extension tag.
2399
- #
2400
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/extensions.rb:54
2401
- def parse_extension_start_tag(type); end
2402
-
2403
- # Used for parsing the first line of a list item or a definition, i.e. the line with list item
2404
- # marker or the definition marker.
2405
- #
2406
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/list.rb:32
2407
- def parse_first_list_line(indentation, content); end
2408
-
2409
- # Parse the foot note definition at the current location.
2410
- #
2411
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/footnote.rb:21
2412
- def parse_footnote_definition; end
2413
-
2414
- # Parse the footnote marker at the current location.
2415
- #
2416
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/footnote.rb:40
2417
- def parse_footnote_marker; end
2418
-
2419
- # Parse the horizontal rule at the current location.
2420
- #
2421
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/horizontal_rule.rb:17
2422
- def parse_horizontal_rule; end
2423
-
2424
- # Parse the HTML entity at the current location.
2425
- #
2426
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/html_entity.rb:17
2427
- def parse_html_entity; end
2428
-
2429
- # Parse the inline math at the current location.
2430
- #
2431
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/math.rb:44
2432
- def parse_inline_math; end
2433
-
2434
- # Parse the line break at the current location.
2435
- #
2436
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/line_break.rb:17
2437
- def parse_line_break; end
2438
-
2439
- # Parse the link at the current scanner position. This method is used to parse normal links as
2440
- # well as image links.
2441
- #
2442
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/link.rb:61
2443
- def parse_link; end
2444
-
2445
- # Parse the link definition at the current location.
2446
- #
2447
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/link.rb:24
2448
- def parse_link_definition; end
2449
-
2450
- # Parse the ordered or unordered list at the current location.
2451
- #
2452
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/list.rb:54
2453
- def parse_list; end
2454
-
2455
- # Parse the paragraph at the current location.
2456
- #
2457
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/paragraph.rb:31
2458
- def parse_paragraph; end
2459
-
2460
- # Parse the Setext header at the current location.
2461
- #
2462
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/header.rb:20
2463
- def parse_setext_header; end
2464
-
2465
- # Parse the smart quotes at current location.
2466
- #
2467
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/smart_quotes.rb:158
2468
- def parse_smart_quotes; end
2469
-
2470
- # Parse the extension span at the current location.
2471
- #
2472
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/extensions.rb:192
2473
- def parse_span_extensions; end
2474
-
2475
- # Parse the HTML at the current position as span-level HTML.
2476
- #
2477
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/html.rb:102
2478
- def parse_span_html; end
2479
-
2480
- # Parse the table at the current location.
2481
- #
2482
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/table.rb:25
2483
- def parse_table; end
2484
-
2485
- # Parse the typographic symbols at the current location.
2486
- #
2487
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/typographic_symbol.rb:22
2488
- def parse_typographic_syms; end
2489
-
2490
- # Replace the abbreviation text with elements.
2491
- #
2492
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/abbreviation.rb:41
2493
- def replace_abbreviations(el, regexps = T.unsafe(nil)); end
2494
-
2495
- # Update the +ial+ with the information from the inline attribute list +opts+.
2496
- #
2497
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/extensions.rb:41
2498
- def update_ial_with_ial(ial, opts); end
2499
-
2500
- protected
2501
-
2502
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/header.rb:59
2503
- def add_header(level, text, id); end
2504
-
2505
- # Adapt the object to allow parsing like specified in the options.
2506
- #
2507
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown.rb:121
2508
- def configure_parser; end
2509
-
2510
- # Create a new block-level element, taking care of applying a preceding block IAL if it
2511
- # exists. This method should always be used for creating a block-level element!
2512
- #
2513
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown.rb:305
2514
- def new_block_el(*args); end
2515
-
2516
- # Parse all block-level elements in +text+ into the element +el+.
2517
- #
2518
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown.rb:140
2519
- def parse_blocks(el, text = T.unsafe(nil)); end
2520
-
2521
- # Returns header text and optional ID.
2522
- #
2523
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/header.rb:47
2524
- def parse_header_contents; end
2525
-
2526
- # Parse all span-level elements in the source string of @src into +el+.
2527
- #
2528
- # If the parameter +stop_re+ (a regexp) is used, parsing is immediately stopped if the regexp
2529
- # matches and if no block is given or if a block is given and it returns +true+.
2530
- #
2531
- # The parameter +parsers+ can be used to specify the (span-level) parsing methods that should
2532
- # be used for parsing.
2533
- #
2534
- # The parameter +text_type+ specifies the type which should be used for created text nodes.
2535
- #
2536
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown.rb:214
2537
- def parse_spans(el, stop_re = T.unsafe(nil), parsers = T.unsafe(nil), text_type = T.unsafe(nil)); end
2538
-
2539
- # Reset the current parsing environment. The parameter +env+ can be used to set initial
2540
- # values for one or more environment variables.
2541
- #
2542
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown.rb:253
2543
- def reset_env(opts = T.unsafe(nil)); end
2544
-
2545
- # Restore the current parsing environment.
2546
- #
2547
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown.rb:268
2548
- def restore_env(env); end
2549
-
2550
- # Return the current parsing environment.
2551
- #
2552
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown.rb:263
2553
- def save_env; end
2554
-
2555
- # Create the needed span parser regexps.
2556
- #
2557
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown.rb:134
2558
- def span_parser_regexps(parsers = T.unsafe(nil)); end
2559
-
2560
- # Update the given attributes hash +attr+ with the information from the inline attribute list
2561
- # +ial+ and all referenced ALDs.
2562
- #
2563
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown.rb:274
2564
- def update_attr_with_ial(attr, ial); end
2565
-
2566
- #
2567
- # Update the parser specific link definitions with the data from +link_defs+ (the value of the
2568
- # :link_defs option).
2569
- #
2570
- # The parameter +link_defs+ is a hash where the keys are possibly unnormalized link IDs and
2571
- # the values are two element arrays consisting of the link target and a title (can be +nil+).
2572
- #
2573
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown.rb:116
2574
- def update_link_definitions(link_defs); end
2575
-
2576
- # Update the raw text for automatic ID generation.
2577
- #
2578
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown.rb:288
2579
- def update_raw_text(item); end
2580
-
2581
- # Update the tree by parsing all :+raw_text+ elements with the span-level parser (resets the
2582
- # environment) and by updating the attributes from the IALs.
2583
- #
2584
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown.rb:166
2585
- def update_tree(element); end
2586
-
2587
- private
2588
-
2589
- # precomputed patterns for indentations 1..4 and fallback expression
2590
- # to compute pattern when indentation is outside the 1..4 range.
2591
- #
2592
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/list.rb:258
2593
- def fetch_pattern(type, indentation); end
2594
-
2595
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown.rb:200
2596
- def span_pattern_cache(stop_re, span_start); end
2597
-
2598
- class << self
2599
- # Add a parser method
2600
- #
2601
- # * with the given +name+,
2602
- # * using +start_re+ as start regexp
2603
- # * and, for span parsers, +span_start+ as a String that can be used in a regexp and
2604
- # which identifies the starting character(s)
2605
- #
2606
- # to the registry. The method name is automatically derived from the +name+ or can explicitly
2607
- # be set by using the +meth_name+ parameter.
2608
- #
2609
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown.rb:328
2610
- def define_parser(name, start_re, span_start = T.unsafe(nil), meth_name = T.unsafe(nil)); end
2611
-
2612
- # Return +true+ if there is a parser called +name+.
2613
- #
2614
- # @return [Boolean]
2615
- #
2616
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown.rb:339
2617
- def has_parser?(name); end
2618
-
2619
- # Return the Data structure for the parser +name+.
2620
- #
2621
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown.rb:334
2622
- def parser(name = T.unsafe(nil)); end
2623
- end
2624
- end
2625
-
2626
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/abbreviation.rb:14
2627
- Kramdown::Parser::Kramdown::ABBREV_DEFINITION_START = T.let(T.unsafe(nil), Regexp)
2628
-
2629
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/autolink.rb:14
2630
- Kramdown::Parser::Kramdown::ACHARS = T.let(T.unsafe(nil), String)
2631
-
2632
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/extensions.rb:140
2633
- Kramdown::Parser::Kramdown::ALD_ANY_CHARS = T.let(T.unsafe(nil), Regexp)
2634
-
2635
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/extensions.rb:142
2636
- Kramdown::Parser::Kramdown::ALD_CLASS_NAME = T.let(T.unsafe(nil), Regexp)
2637
-
2638
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/extensions.rb:139
2639
- Kramdown::Parser::Kramdown::ALD_ID_CHARS = T.let(T.unsafe(nil), Regexp)
2640
-
2641
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/extensions.rb:141
2642
- Kramdown::Parser::Kramdown::ALD_ID_NAME = T.let(T.unsafe(nil), Regexp)
2643
-
2644
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/extensions.rb:150
2645
- Kramdown::Parser::Kramdown::ALD_START = T.let(T.unsafe(nil), Regexp)
2646
-
2647
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/extensions.rb:149
2648
- Kramdown::Parser::Kramdown::ALD_TYPE_ANY = T.let(T.unsafe(nil), Regexp)
2649
-
2650
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/extensions.rb:144
2651
- Kramdown::Parser::Kramdown::ALD_TYPE_CLASS_NAME = T.let(T.unsafe(nil), Regexp)
2652
-
2653
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/extensions.rb:145
2654
- Kramdown::Parser::Kramdown::ALD_TYPE_ID_NAME = T.let(T.unsafe(nil), Regexp)
2655
-
2656
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/extensions.rb:146
2657
- Kramdown::Parser::Kramdown::ALD_TYPE_ID_OR_CLASS = T.let(T.unsafe(nil), Regexp)
2658
-
2659
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/extensions.rb:147
2660
- Kramdown::Parser::Kramdown::ALD_TYPE_ID_OR_CLASS_MULTI = T.let(T.unsafe(nil), Regexp)
2661
-
2662
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/extensions.rb:143
2663
- Kramdown::Parser::Kramdown::ALD_TYPE_KEY_VALUE_PAIR = T.let(T.unsafe(nil), Regexp)
2664
-
2665
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/extensions.rb:148
2666
- Kramdown::Parser::Kramdown::ALD_TYPE_REF = T.let(T.unsafe(nil), Regexp)
2667
-
2668
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/header.rb:29
2669
- Kramdown::Parser::Kramdown::ATX_HEADER_START = T.let(T.unsafe(nil), Regexp)
2670
-
2671
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/autolink.rb:16
2672
- Kramdown::Parser::Kramdown::AUTOLINK_START = T.let(T.unsafe(nil), Regexp)
2673
-
2674
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/autolink.rb:15
2675
- Kramdown::Parser::Kramdown::AUTOLINK_START_STR = T.let(T.unsafe(nil), String)
2676
-
2677
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/blank_line.rb:14
2678
- Kramdown::Parser::Kramdown::BLANK_LINE = T.let(T.unsafe(nil), Regexp)
2679
-
2680
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/blockquote.rb:18
2681
- Kramdown::Parser::Kramdown::BLOCKQUOTE_START = T.let(T.unsafe(nil), Regexp)
2682
-
2683
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/block_boundary.rb:18
2684
- Kramdown::Parser::Kramdown::BLOCK_BOUNDARY = T.let(T.unsafe(nil), Regexp)
2685
-
2686
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/extensions.rb:160
2687
- Kramdown::Parser::Kramdown::BLOCK_EXTENSIONS_START = T.let(T.unsafe(nil), Regexp)
2688
-
2689
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/math.rb:16
2690
- Kramdown::Parser::Kramdown::BLOCK_MATH_START = T.let(T.unsafe(nil), Regexp)
2691
-
2692
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/codeblock.rb:20
2693
- Kramdown::Parser::Kramdown::CODEBLOCK_MATCH = T.let(T.unsafe(nil), Regexp)
2694
-
2695
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/codeblock.rb:19
2696
- Kramdown::Parser::Kramdown::CODEBLOCK_START = T.let(T.unsafe(nil), Regexp)
2697
-
2698
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/codespan.rb:14
2699
- Kramdown::Parser::Kramdown::CODESPAN_DELIMITER = T.let(T.unsafe(nil), Regexp)
2700
-
2701
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/list.rb:150
2702
- Kramdown::Parser::Kramdown::DEFINITION_LIST_START = T.let(T.unsafe(nil), Regexp)
2703
-
2704
- # Struct class holding all the needed data for one block/span-level parser method.
2705
- #
2706
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown.rb:317
2707
- class Kramdown::Parser::Kramdown::Data < ::Struct
2708
- # Returns the value of attribute method
2709
- #
2710
- # @return [Object] the current value of method
2711
- def method; end
2712
-
2713
- # Sets the attribute method
2714
- #
2715
- # @param value [Object] the value to set the attribute method to.
2716
- # @return [Object] the newly set value
2717
- def method=(_); end
2718
-
2719
- # Returns the value of attribute name
2720
- #
2721
- # @return [Object] the current value of name
2722
- def name; end
2723
-
2724
- # Sets the attribute name
2725
- #
2726
- # @param value [Object] the value to set the attribute name to.
2727
- # @return [Object] the newly set value
2728
- def name=(_); end
2729
-
2730
- # Returns the value of attribute span_start
2731
- #
2732
- # @return [Object] the current value of span_start
2733
- def span_start; end
2734
-
2735
- # Sets the attribute span_start
2736
- #
2737
- # @param value [Object] the value to set the attribute span_start to.
2738
- # @return [Object] the newly set value
2739
- def span_start=(_); end
2740
-
2741
- # Returns the value of attribute start_re
2742
- #
2743
- # @return [Object] the current value of start_re
2744
- def start_re; end
2745
-
2746
- # Sets the attribute start_re
2747
- #
2748
- # @param value [Object] the value to set the attribute start_re to.
2749
- # @return [Object] the newly set value
2750
- def start_re=(_); end
2751
-
2752
- class << self
2753
- def [](*_arg0); end
2754
- def inspect; end
2755
- def keyword_init?; end
2756
- def members; end
2757
- def new(*_arg0); end
2758
- end
2759
- end
2760
-
2761
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/emphasis.rb:14
2762
- Kramdown::Parser::Kramdown::EMPHASIS_START = T.let(T.unsafe(nil), Regexp)
2763
-
2764
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/eob.rb:14
2765
- Kramdown::Parser::Kramdown::EOB_MARKER = T.let(T.unsafe(nil), Regexp)
2766
-
2767
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/escaped_chars.rb:14
2768
- Kramdown::Parser::Kramdown::ESCAPED_CHARS = T.let(T.unsafe(nil), Regexp)
2769
-
2770
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/extensions.rb:154
2771
- Kramdown::Parser::Kramdown::EXT_BLOCK_START = T.let(T.unsafe(nil), Regexp)
2772
-
2773
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/extensions.rb:155
2774
- Kramdown::Parser::Kramdown::EXT_BLOCK_STOP_STR = T.let(T.unsafe(nil), String)
2775
-
2776
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/extensions.rb:187
2777
- Kramdown::Parser::Kramdown::EXT_SPAN_START = T.let(T.unsafe(nil), Regexp)
2778
-
2779
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/extensions.rb:153
2780
- Kramdown::Parser::Kramdown::EXT_START_STR = T.let(T.unsafe(nil), String)
2781
-
2782
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/extensions.rb:152
2783
- Kramdown::Parser::Kramdown::EXT_STOP_STR = T.let(T.unsafe(nil), String)
2784
-
2785
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/codeblock.rb:34
2786
- Kramdown::Parser::Kramdown::FENCED_CODEBLOCK_MATCH = T.let(T.unsafe(nil), Regexp)
2787
-
2788
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/codeblock.rb:33
2789
- Kramdown::Parser::Kramdown::FENCED_CODEBLOCK_START = T.let(T.unsafe(nil), Regexp)
2790
-
2791
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/footnote.rb:18
2792
- Kramdown::Parser::Kramdown::FOOTNOTE_DEFINITION_START = T.let(T.unsafe(nil), Regexp)
2793
-
2794
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/footnote.rb:37
2795
- Kramdown::Parser::Kramdown::FOOTNOTE_MARKER_START = T.let(T.unsafe(nil), Regexp)
2796
-
2797
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/header.rb:44
2798
- Kramdown::Parser::Kramdown::HEADER_ID = T.let(T.unsafe(nil), Regexp)
2799
-
2800
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/horizontal_rule.rb:14
2801
- Kramdown::Parser::Kramdown::HR_START = T.let(T.unsafe(nil), Regexp)
2802
-
2803
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/html.rb:68
2804
- Kramdown::Parser::Kramdown::HTML_BLOCK_START = T.let(T.unsafe(nil), Regexp)
2805
-
2806
- # Mapping of markdown attribute value to content model. I.e. :raw when "0", :default when "1"
2807
- # (use default content model for the HTML element), :span when "span", :block when block and
2808
- # for everything else +nil+ is returned.
2809
- #
2810
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/html.rb:21
2811
- Kramdown::Parser::Kramdown::HTML_MARKDOWN_ATTR_MAP = T.let(T.unsafe(nil), Hash)
2812
-
2813
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/html.rb:99
2814
- Kramdown::Parser::Kramdown::HTML_SPAN_START = T.let(T.unsafe(nil), Regexp)
2815
-
2816
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/extensions.rb:157
2817
- Kramdown::Parser::Kramdown::IAL_BLOCK = T.let(T.unsafe(nil), Regexp)
2818
-
2819
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/extensions.rb:158
2820
- Kramdown::Parser::Kramdown::IAL_BLOCK_START = T.let(T.unsafe(nil), Regexp)
2821
-
2822
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/extensions.rb:14
2823
- Kramdown::Parser::Kramdown::IAL_CLASS_ATTR = T.let(T.unsafe(nil), String)
2824
-
2825
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/extensions.rb:188
2826
- Kramdown::Parser::Kramdown::IAL_SPAN_START = T.let(T.unsafe(nil), Regexp)
2827
-
2828
- # Regexp for matching indentation (one tab or four spaces)
2829
- #
2830
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown.rb:344
2831
- Kramdown::Parser::Kramdown::INDENT = T.let(T.unsafe(nil), Regexp)
2832
-
2833
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/math.rb:41
2834
- Kramdown::Parser::Kramdown::INLINE_MATH_START = T.let(T.unsafe(nil), Regexp)
2835
-
2836
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/paragraph.rb:24
2837
- Kramdown::Parser::Kramdown::LAZY_END = T.let(T.unsafe(nil), Regexp)
2838
-
2839
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/paragraph.rb:20
2840
- Kramdown::Parser::Kramdown::LAZY_END_HTML_SPAN_ELEMENTS = T.let(T.unsafe(nil), Array)
2841
-
2842
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/paragraph.rb:21
2843
- Kramdown::Parser::Kramdown::LAZY_END_HTML_START = T.let(T.unsafe(nil), Regexp)
2844
-
2845
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/paragraph.rb:22
2846
- Kramdown::Parser::Kramdown::LAZY_END_HTML_STOP = T.let(T.unsafe(nil), Regexp)
2847
-
2848
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/line_break.rb:14
2849
- Kramdown::Parser::Kramdown::LINE_BREAK = T.let(T.unsafe(nil), Regexp)
2850
-
2851
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/link.rb:53
2852
- Kramdown::Parser::Kramdown::LINK_BRACKET_STOP_RE = T.let(T.unsafe(nil), Regexp)
2853
-
2854
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/link.rb:21
2855
- Kramdown::Parser::Kramdown::LINK_DEFINITION_START = T.let(T.unsafe(nil), Regexp)
2856
-
2857
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/link.rb:55
2858
- Kramdown::Parser::Kramdown::LINK_INLINE_ID_RE = T.let(T.unsafe(nil), Regexp)
2859
-
2860
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/link.rb:56
2861
- Kramdown::Parser::Kramdown::LINK_INLINE_TITLE_RE = T.let(T.unsafe(nil), Regexp)
2862
-
2863
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/link.rb:54
2864
- Kramdown::Parser::Kramdown::LINK_PAREN_STOP_RE = T.let(T.unsafe(nil), Regexp)
2865
-
2866
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/link.rb:57
2867
- Kramdown::Parser::Kramdown::LINK_START = T.let(T.unsafe(nil), Regexp)
2868
-
2869
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/list.rb:19
2870
- Kramdown::Parser::Kramdown::LIST_ITEM_IAL = T.let(T.unsafe(nil), Regexp)
2871
-
2872
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/list.rb:20
2873
- Kramdown::Parser::Kramdown::LIST_ITEM_IAL_CHECK = T.let(T.unsafe(nil), Regexp)
2874
-
2875
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/list.rb:51
2876
- Kramdown::Parser::Kramdown::LIST_START = T.let(T.unsafe(nil), Regexp)
2877
-
2878
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/list.rb:50
2879
- Kramdown::Parser::Kramdown::LIST_START_OL = T.let(T.unsafe(nil), Regexp)
2880
-
2881
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/list.rb:49
2882
- Kramdown::Parser::Kramdown::LIST_START_UL = T.let(T.unsafe(nil), Regexp)
2883
-
2884
- # Regexp for matching the optional space (zero or up to three spaces)
2885
- #
2886
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown.rb:346
2887
- Kramdown::Parser::Kramdown::OPT_SPACE = T.let(T.unsafe(nil), Regexp)
2888
-
2889
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/paragraph.rb:28
2890
- Kramdown::Parser::Kramdown::PARAGRAPH_END = T.let(T.unsafe(nil), Regexp)
2891
-
2892
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/paragraph.rb:27
2893
- Kramdown::Parser::Kramdown::PARAGRAPH_MATCH = T.let(T.unsafe(nil), Regexp)
2894
-
2895
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/paragraph.rb:26
2896
- Kramdown::Parser::Kramdown::PARAGRAPH_START = T.let(T.unsafe(nil), Regexp)
2897
-
2898
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/list.rb:22
2899
- Kramdown::Parser::Kramdown::PARSE_FIRST_LIST_LINE_REGEXP_CACHE = T.let(T.unsafe(nil), Hash)
2900
-
2901
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/list.rb:47
2902
- Kramdown::Parser::Kramdown::PATTERN_TAIL = T.let(T.unsafe(nil), Regexp)
2903
-
2904
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/header.rb:17
2905
- Kramdown::Parser::Kramdown::SETEXT_HEADER_START = T.let(T.unsafe(nil), Regexp)
2906
-
2907
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/smart_quotes.rb:155
2908
- Kramdown::Parser::Kramdown::SMART_QUOTES_RE = T.let(T.unsafe(nil), Regexp)
2909
-
2910
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/extensions.rb:189
2911
- Kramdown::Parser::Kramdown::SPAN_EXTENSIONS_START = T.let(T.unsafe(nil), Regexp)
2912
-
2913
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/smart_quotes.rb:122
2914
- Kramdown::Parser::Kramdown::SQ_CLOSE = T.let(T.unsafe(nil), String)
2915
-
2916
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/smart_quotes.rb:121
2917
- Kramdown::Parser::Kramdown::SQ_PUNCT = T.let(T.unsafe(nil), String)
2918
-
2919
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/smart_quotes.rb:124
2920
- Kramdown::Parser::Kramdown::SQ_RULES = T.let(T.unsafe(nil), Array)
2921
-
2922
- # '"
2923
- #
2924
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/smart_quotes.rb:145
2925
- Kramdown::Parser::Kramdown::SQ_SUBSTS = T.let(T.unsafe(nil), Hash)
2926
-
2927
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/table.rb:18
2928
- Kramdown::Parser::Kramdown::TABLE_FSEP_LINE = T.let(T.unsafe(nil), Regexp)
2929
-
2930
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/table.rb:17
2931
- Kramdown::Parser::Kramdown::TABLE_HSEP_ALIGN = T.let(T.unsafe(nil), Regexp)
2932
-
2933
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/table.rb:21
2934
- Kramdown::Parser::Kramdown::TABLE_LINE = T.let(T.unsafe(nil), Regexp)
2935
-
2936
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/table.rb:20
2937
- Kramdown::Parser::Kramdown::TABLE_PIPE_CHECK = T.let(T.unsafe(nil), Regexp)
2938
-
2939
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/table.rb:19
2940
- Kramdown::Parser::Kramdown::TABLE_ROW_LINE = T.let(T.unsafe(nil), Regexp)
2941
-
2942
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/table.rb:16
2943
- Kramdown::Parser::Kramdown::TABLE_SEP_LINE = T.let(T.unsafe(nil), Regexp)
2944
-
2945
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/table.rb:22
2946
- Kramdown::Parser::Kramdown::TABLE_START = T.let(T.unsafe(nil), Regexp)
2947
-
2948
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/html.rb:23
2949
- Kramdown::Parser::Kramdown::TRAILING_WHITESPACE = T.let(T.unsafe(nil), Regexp)
2950
-
2951
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/typographic_symbol.rb:14
2952
- Kramdown::Parser::Kramdown::TYPOGRAPHIC_SYMS = T.let(T.unsafe(nil), Array)
2953
-
2954
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/typographic_symbol.rb:19
2955
- Kramdown::Parser::Kramdown::TYPOGRAPHIC_SYMS_RE = T.let(T.unsafe(nil), Regexp)
2956
-
2957
- # source://kramdown-2.4.0/lib/kramdown/parser/kramdown/typographic_symbol.rb:18
2958
- Kramdown::Parser::Kramdown::TYPOGRAPHIC_SYMS_SUBST = T.let(T.unsafe(nil), Hash)
2959
-
2960
- # Used for parsing a document in Markdown format.
2961
- #
2962
- # This parser is based on the kramdown parser and removes the parser methods for the additional
2963
- # non-Markdown features. However, since some things are handled differently by the kramdown
2964
- # parser methods (like deciding when a list item contains just text), this parser differs from
2965
- # real Markdown parsers in some respects.
2966
- #
2967
- # Note, though, that the parser basically fails just one of the Markdown test cases (some others
2968
- # also fail but those failures are negligible).
2969
- #
2970
- # source://kramdown-2.4.0/lib/kramdown/parser/markdown.rb:25
2971
- class Kramdown::Parser::Markdown < ::Kramdown::Parser::Kramdown
2972
- # @return [Markdown] a new instance of Markdown
2973
- #
2974
- # source://kramdown-2.4.0/lib/kramdown/parser/markdown.rb:32
2975
- def initialize(source, options); end
2976
- end
2977
-
2978
- # :stopdoc:
2979
- #
2980
- # source://kramdown-2.4.0/lib/kramdown/parser/markdown.rb:40
2981
- Kramdown::Parser::Markdown::BLOCK_BOUNDARY = T.let(T.unsafe(nil), Regexp)
2982
-
2983
- # source://kramdown-2.4.0/lib/kramdown/parser/markdown.rb:43
2984
- Kramdown::Parser::Markdown::CODEBLOCK_MATCH = T.let(T.unsafe(nil), Regexp)
2985
-
2986
- # Array with all the parsing methods that should be removed from the standard kramdown parser.
2987
- #
2988
- # source://kramdown-2.4.0/lib/kramdown/parser/markdown.rb:28
2989
- Kramdown::Parser::Markdown::EXTENDED = T.let(T.unsafe(nil), Array)
2990
-
2991
- # source://kramdown-2.4.0/lib/kramdown/parser/markdown.rb:46
2992
- Kramdown::Parser::Markdown::IAL_RAND_CHARS = T.let(T.unsafe(nil), Array)
2993
-
2994
- # source://kramdown-2.4.0/lib/kramdown/parser/markdown.rb:47
2995
- Kramdown::Parser::Markdown::IAL_RAND_STRING = T.let(T.unsafe(nil), String)
2996
-
2997
- # source://kramdown-2.4.0/lib/kramdown/parser/markdown.rb:49
2998
- Kramdown::Parser::Markdown::IAL_SPAN_START = T.let(T.unsafe(nil), Regexp)
2999
-
3000
- # source://kramdown-2.4.0/lib/kramdown/parser/markdown.rb:41
3001
- Kramdown::Parser::Markdown::LAZY_END = T.let(T.unsafe(nil), Regexp)
3002
-
3003
- # source://kramdown-2.4.0/lib/kramdown/parser/markdown.rb:48
3004
- Kramdown::Parser::Markdown::LIST_ITEM_IAL = T.let(T.unsafe(nil), Regexp)
3005
-
3006
- # source://kramdown-2.4.0/lib/kramdown/parser/markdown.rb:44
3007
- Kramdown::Parser::Markdown::PARAGRAPH_END = T.let(T.unsafe(nil), Regexp)
3008
-
3009
- # == \Utils Module
3010
- #
3011
- # This module contains utility class/modules/methods that can be used by both parsers and
3012
- # converters.
3013
- #
3014
- # source://kramdown-2.4.0/lib/kramdown/utils.rb:16
3015
- module Kramdown::Utils
3016
- class << self
3017
- # Treat +name+ as if it were snake cased (e.g. snake_case) and camelize it (e.g. SnakeCase).
3018
- #
3019
- # source://kramdown-2.4.0/lib/kramdown/utils.rb:26
3020
- def camelize(name); end
3021
-
3022
- # source://kramdown-2.4.0/lib/kramdown/utils.rb:39
3023
- def deep_const_get(str); end
3024
-
3025
- # Treat +name+ as if it were camelized (e.g. CamelizedName) and snake-case it (e.g. camelized_name).
3026
- #
3027
- # source://kramdown-2.4.0/lib/kramdown/utils.rb:31
3028
- def snake_case(name); end
3029
- end
3030
- end
3031
-
3032
- # Methods for registering configurable extensions.
3033
- #
3034
- # source://kramdown-2.4.0/lib/kramdown/utils/configurable.rb:14
3035
- module Kramdown::Utils::Configurable
3036
- # Create a new configurable extension called +name+.
3037
- #
3038
- # Three methods will be defined on the calling object which allow to use this configurable
3039
- # extension:
3040
- #
3041
- # configurables:: Returns a hash of hashes that is used to store all configurables of the
3042
- # object.
3043
- #
3044
- # <name>(ext_name):: Return the configured extension +ext_name+.
3045
- #
3046
- # add_<name>(ext_name, data=nil, &block):: Define an extension +ext_name+ by specifying either
3047
- # the data as argument or by using a block.
3048
- #
3049
- # source://kramdown-2.4.0/lib/kramdown/utils/configurable.rb:28
3050
- def configurable(name); end
3051
- end
3052
-
3053
- # Provides convenience methods for handling named and numeric entities.
3054
- #
3055
- # source://kramdown-2.4.0/lib/kramdown/utils/entities.rb:15
3056
- module Kramdown::Utils::Entities
3057
- private
3058
-
3059
- # Return the entity for the given code point or name +point_or_name+.
3060
- #
3061
- # source://kramdown-2.4.0/lib/kramdown/utils/entities.rb:334
3062
- def entity(point_or_name); end
3063
-
3064
- class << self
3065
- # Return the entity for the given code point or name +point_or_name+.
3066
- #
3067
- # source://kramdown-2.4.0/lib/kramdown/utils/entities.rb:334
3068
- def entity(point_or_name); end
3069
- end
3070
- end
3071
-
3072
- # Contains the mapping of code point (or name) to the actual Entity object.
3073
- #
3074
- # source://kramdown-2.4.0/lib/kramdown/utils/entities.rb:317
3075
- Kramdown::Utils::Entities::ENTITY_MAP = T.let(T.unsafe(nil), Hash)
3076
-
3077
- # Array of arrays. Each sub-array specifies a code point and the associated name.
3078
- #
3079
- # This table is not used directly -- Entity objects are automatically created from it and put
3080
- # into a Hash map when this file is loaded.
3081
- #
3082
- # source://kramdown-2.4.0/lib/kramdown/utils/entities.rb:29
3083
- Kramdown::Utils::Entities::ENTITY_TABLE = T.let(T.unsafe(nil), Array)
3084
-
3085
- # Represents an entity that has a +code_point+ and +name+.
3086
- #
3087
- # source://kramdown-2.4.0/lib/kramdown/utils/entities.rb:18
3088
- class Kramdown::Utils::Entities::Entity < ::Struct
3089
- # Return the UTF8 representation of the entity.
3090
- #
3091
- # source://kramdown-2.4.0/lib/kramdown/utils/entities.rb:20
3092
- def char; end
3093
-
3094
- # Returns the value of attribute code_point
3095
- #
3096
- # @return [Object] the current value of code_point
3097
- def code_point; end
3098
-
3099
- # Sets the attribute code_point
3100
- #
3101
- # @param value [Object] the value to set the attribute code_point to.
3102
- # @return [Object] the newly set value
3103
- def code_point=(_); end
3104
-
3105
- # Returns the value of attribute name
3106
- #
3107
- # @return [Object] the current value of name
3108
- def name; end
3109
-
3110
- # Sets the attribute name
3111
- #
3112
- # @param value [Object] the value to set the attribute name to.
3113
- # @return [Object] the newly set value
3114
- def name=(_); end
3115
-
3116
- class << self
3117
- def [](*_arg0); end
3118
- def inspect; end
3119
- def keyword_init?; end
3120
- def members; end
3121
- def new(*_arg0); end
3122
- end
3123
- end
3124
-
3125
- # Provides convenience methods for HTML related tasks.
3126
- #
3127
- # *Note* that this module has to be mixed into a class that has a @root (containing an element
3128
- # of type :root) and an @options (containing an options hash) instance variable so that some of
3129
- # the methods can work correctly.
3130
- #
3131
- # source://kramdown-2.4.0/lib/kramdown/utils/html.rb:21
3132
- module Kramdown::Utils::Html
3133
- # Convert the entity +e+ to a string. The optional parameter +original+ may contain the
3134
- # original representation of the entity.
3135
- #
3136
- # This method uses the option +entity_output+ to determine the output form for the entity.
3137
- #
3138
- # source://kramdown-2.4.0/lib/kramdown/utils/html.rb:27
3139
- def entity_to_str(e, original = T.unsafe(nil)); end
3140
-
3141
- # Escape the special HTML characters in the string +str+. The parameter +type+ specifies what
3142
- # is escaped: :all - all special HTML characters except the quotation mark as well as
3143
- # entities, :text - all special HTML characters except the quotation mark but no entities and
3144
- # :attribute - all special HTML characters including the quotation mark but no entities.
3145
- #
3146
- # source://kramdown-2.4.0/lib/kramdown/utils/html.rb:69
3147
- def escape_html(str, type = T.unsafe(nil)); end
3148
-
3149
- # source://kramdown-2.4.0/lib/kramdown/utils/html.rb:74
3150
- def fix_cjk_line_break(str); end
3151
-
3152
- # Return the HTML representation of the attributes +attr+.
3153
- #
3154
- # source://kramdown-2.4.0/lib/kramdown/utils/html.rb:44
3155
- def html_attributes(attr); end
3156
- end
3157
-
3158
- # source://kramdown-2.4.0/lib/kramdown/utils/html.rb:59
3159
- Kramdown::Utils::Html::ESCAPE_ALL_RE = T.let(T.unsafe(nil), Regexp)
3160
-
3161
- # source://kramdown-2.4.0/lib/kramdown/utils/html.rb:61
3162
- Kramdown::Utils::Html::ESCAPE_ATTRIBUTE_RE = T.let(T.unsafe(nil), Regexp)
3163
-
3164
- # :stopdoc:
3165
- #
3166
- # source://kramdown-2.4.0/lib/kramdown/utils/html.rb:53
3167
- Kramdown::Utils::Html::ESCAPE_MAP = T.let(T.unsafe(nil), Hash)
3168
-
3169
- # source://kramdown-2.4.0/lib/kramdown/utils/html.rb:62
3170
- Kramdown::Utils::Html::ESCAPE_RE_FROM_TYPE = T.let(T.unsafe(nil), Hash)
3171
-
3172
- # source://kramdown-2.4.0/lib/kramdown/utils/html.rb:60
3173
- Kramdown::Utils::Html::ESCAPE_TEXT_RE = T.let(T.unsafe(nil), Regexp)
3174
-
3175
- # source://kramdown-2.4.0/lib/kramdown/utils/html.rb:73
3176
- Kramdown::Utils::Html::REDUNDANT_LINE_BREAK_REGEX = T.let(T.unsafe(nil), Regexp)
3177
-
3178
- # A simple least recently used (LRU) cache.
3179
- #
3180
- # The cache relies on the fact that Ruby's Hash class maintains insertion order. So deleting
3181
- # and re-inserting a key-value pair on access moves the key to the last position. When an
3182
- # entry is added and the cache is full, the first entry is removed.
3183
- #
3184
- # source://kramdown-2.4.0/lib/kramdown/utils/lru_cache.rb:18
3185
- class Kramdown::Utils::LRUCache
3186
- # Creates a new LRUCache that can hold +size+ entries.
3187
- #
3188
- # @return [LRUCache] a new instance of LRUCache
3189
- #
3190
- # source://kramdown-2.4.0/lib/kramdown/utils/lru_cache.rb:21
3191
- def initialize(size); end
3192
-
3193
- # Returns the stored value for +key+ or +nil+ if no value was stored under the key.
3194
- #
3195
- # source://kramdown-2.4.0/lib/kramdown/utils/lru_cache.rb:27
3196
- def [](key); end
3197
-
3198
- # Stores the +value+ under the +key+.
3199
- #
3200
- # source://kramdown-2.4.0/lib/kramdown/utils/lru_cache.rb:32
3201
- def []=(key, value); end
3202
- end
3203
-
3204
- # This patched StringScanner adds line number information for current scan position and a
3205
- # start_line_number override for nested StringScanners.
3206
- #
3207
- # source://kramdown-2.4.0/lib/kramdown/utils/string_scanner.rb:17
3208
- class Kramdown::Utils::StringScanner < ::StringScanner
3209
- # Takes the start line number as optional second argument.
3210
- #
3211
- # Note: The original second argument is no longer used so this should be safe.
3212
- #
3213
- # @return [StringScanner] a new instance of StringScanner
3214
- #
3215
- # source://kramdown-2.4.0/lib/kramdown/utils/string_scanner.rb:26
3216
- def initialize(string, start_line_number = T.unsafe(nil)); end
3217
-
3218
- # Returns the line number for current charpos.
3219
- #
3220
- # NOTE: Requires that all line endings are normalized to '\n'
3221
- #
3222
- # NOTE: Normally we'd have to add one to the count of newlines to get the correct line number.
3223
- # However we add the one indirectly by using a one-based start_line_number.
3224
- #
3225
- # source://kramdown-2.4.0/lib/kramdown/utils/string_scanner.rb:67
3226
- def current_line_number; end
3227
-
3228
- # Sets the byte position of the scan pointer.
3229
- #
3230
- # Note: This also resets some internal variables, so always use pos= when setting the position
3231
- # and don't use any other method for that!
3232
- #
3233
- # source://kramdown-2.4.0/lib/kramdown/utils/string_scanner.rb:37
3234
- def pos=(pos); end
3235
-
3236
- # Revert the position to one saved by #save_pos.
3237
- #
3238
- # source://kramdown-2.4.0/lib/kramdown/utils/string_scanner.rb:56
3239
- def revert_pos(data); end
3240
-
3241
- # Return information needed to revert the byte position of the string scanner in a performant
3242
- # way.
3243
- #
3244
- # The returned data can be fed to #revert_pos to revert the position to the saved one.
3245
- #
3246
- # Note: Just saving #pos won't be enough.
3247
- #
3248
- # source://kramdown-2.4.0/lib/kramdown/utils/string_scanner.rb:51
3249
- def save_pos; end
3250
-
3251
- # The start line number. Used for nested StringScanners that scan a sub-string of the source
3252
- # document. The kramdown parser uses this, e.g., for span level parsers.
3253
- #
3254
- # source://kramdown-2.4.0/lib/kramdown/utils/string_scanner.rb:21
3255
- def start_line_number; end
3256
- end
3257
-
3258
- # The kramdown version.
3259
- #
3260
- # source://kramdown-2.4.0/lib/kramdown/version.rb:13
3261
- Kramdown::VERSION = T.let(T.unsafe(nil), String)