Class: HtmlToProsemirror::Marks::Code

Inherits:
Mark
  • Object
show all
Defined in:
lib/html_to_prosemirror/marks/code.rb

Instance Attribute Summary

Attributes inherited from Mark

#type

Instance Method Summary collapse

Methods inherited from Mark

#initialize

Constructor Details

This class inherits a constructor from HtmlToProsemirror::Marks::Mark

Instance Method Details

#dataObject



12
13
14
15
16
# File 'lib/html_to_prosemirror/marks/code.rb', line 12

def data
  {
    type: "code"
  }
end

#matchingObject



5
6
7
8
9
10
# File 'lib/html_to_prosemirror/marks/code.rb', line 5

def matching
  if (@node.parent.name === 'pre')
    return false
  end
  @node.name === 'code'
end