Skip to content

Instantly share code, notes, and snippets.

@cimfalab
Last active August 11, 2017 11:01
Show Gist options
  • Save cimfalab/0283ee57d37910e2682db677d7fa27bb to your computer and use it in GitHub Desktop.
Save cimfalab/0283ee57d37910e2682db677d7fa27bb to your computer and use it in GitHub Desktop.
markdown.js
function addAttributes( section, element, previousElement, separatorElementAttributes, separatorSectionAttributes ) {
if ( element != null && element.childNodes != undefined && element.childNodes.length > 0 ) {
previousParentElement = element;
for( var i = 0; i < element.childNodes.length; i++ ) {
childElement = element.childNodes[i];
...
}
}
if ( element.nodeType == Node.COMMENT_NODE ) {
if ( addAttributeInElement( element, previousElement, separatorElementAttributes ) == false ) {
addAttributeInElement( element, section, separatorSectionAttributes );
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment