Class: Markbridge::Parsers::BBCode::Handlers::CodeHandler

Inherits:
RawHandler show all
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

#element_class

Attributes inherited from BaseHandler

#element_class

Instance Method Summary collapse

Methods inherited from RawHandler

#on_close, #on_open

Methods inherited from BaseHandler

#auto_closeable?, #on_close, #on_open

Constructor Details

#initializeCodeHandler

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