lunchmoney 1.1.1 → 1.1.2

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