lib/pagehub-markdown/processors/embedder.rb
# Node should be the root node that contains the embedded content,
# which will be stripped of all attributes and injected with new ones:
# 1. data-embed-uri containing the URI of the embedded resource
# 2. data-embed-src the name of the processor used for embedding
#
# All children nodes that have an @id attribute will have that attribute
# removed as well.
Node should be the root node that contains the embedded content,
which will be stripped of all attributes and injected with new ones:
1. data-embed-uri containing the URI of the embedded resource
2. data-embed-src the name of the processor used for embedding

All children nodes that have an @id attribute will have that attribute
removed as well.
Node should be the root node that contains the embedded content which will be stripped of all attributes and injected with new ones : 1 . data - embed - uri containing the URI of the embedded resource 2 . data - embed - src the name of the processor used for embedding All children nodes that have an @id attribute will have that attribute removed as well .
def stamp(node, uri, key)
        node.xpath("//*[@id]").each { |node| node.remove_attribute "id" }
        node.attributes.each_pair { |name,_| node.remove_attribute name }
        node['data-embed-uri'] = uri
        node['data-embed-src'] = key
      end
def stamp ( node , uri , key ) node . xpath ( "//*[@id]" ) . each { | node | node . remove_attribute "id" } node . attributes . each_pair { | name , _ | node . remove_attribute name } node [ 'data-embed-uri' ] = uri node [ 'data-embed-src' ] = key end
Node should be the root node that contains the embedded content,
which will be stripped of all attributes and injected with new ones:
1. data-embed-uri containing the URI of the embedded resource
2. data-embed-src the name of the processor used for embedding
Node should be the root node that contains the embedded content which will be stripped of all attributes and injected with new ones : 1 . data - embed - uri containing the URI of the embedded resource 2 . data - embed - src the name of the processor used for embedding
node
<not_specific>
uri
<not_specific>
key
<not_specific>