This adds support for a new attribute `_example` which, if present, will load the file under `tests/examplefiles` pointed to by `_example` and show it as part of the lexer documentation. This allows us to have unit-tested files show up as small code snippets in the documentation, without having to worry that the documentation output contains possibly incorrectly highlighted code.
19 lines
436 B
Text
Generated
19 lines
436 B
Text
Generated
'irb(main):001:0> ' Generic.Prompt
|
|
'a' Name
|
|
' ' Text.Whitespace
|
|
'=' Operator
|
|
' ' Text.Whitespace
|
|
'1' Literal.Number.Integer
|
|
'\n' Text.Whitespace
|
|
|
|
'=> 1\n' Generic.Output
|
|
|
|
'irb(main):002:0> ' Generic.Prompt
|
|
'puts' Name.Builtin
|
|
' ' Text.Whitespace
|
|
'a' Name
|
|
'\n' Text.Whitespace
|
|
|
|
'1\n' Generic.Output
|
|
|
|
'=> nil\n' Generic.Output
|