Class: Markbridge::Parsers::BBCode::Handlers::CodeHandler
- Inherits:
-
RawHandler
- Object
- BaseHandler
- RawHandler
- Markbridge::Parsers::BBCode::Handlers::CodeHandler
- Defined in:
- lib/markbridge/parsers/bbcode/handlers/code_handler.rb
Overview
Handler for [code]… tags
Preserves content as-is without parsing nested BBCode Inherits from RawHandler using AST::Code element
Example:
- code=python
-
def hello_world():
print("Hello, world!")- /code
Instance Attribute Summary
Attributes inherited from RawHandler
Attributes inherited from BaseHandler
Instance Method Summary collapse
-
#initialize ⇒ CodeHandler
constructor
A new instance of CodeHandler.
Methods inherited from RawHandler
Methods inherited from BaseHandler
#auto_closeable?, #on_close, #on_open
Constructor Details
#initialize ⇒ CodeHandler
Returns a new instance of CodeHandler.
18 19 20 |
# File 'lib/markbridge/parsers/bbcode/handlers/code_handler.rb', line 18 def initialize super(AST::Code) end |