Sha256: d4a69b625e407478c16e41ef0c5320f48c493ad36dea6b5419dfa4fa626c3d48
Contents?: true
Size: 607 Bytes
Versions: 10
Compression:
Stored size: 607 Bytes
Contents
Editor.Parsers.push class rule: /^(!{1}\[([^\]]+)\])(\(([^\s]+)?\))$/i constructor: (node) -> @walker = document.createTreeWalker(node, NodeFilter.SHOW_TEXT) isMatched: => @match = @rule.exec(@walker.root.textContent) @match? render: => @figure = EditorElements.content.querySelector("[as='Editor.Image']").cloneNode(true) @caption = @figure.querySelector('figcaption') @caption.appendChild document.createTextNode(@match[1]) @caption.appendChild document.createTextNode(@match[3]) if @match[4]? @caption.setAttribute('name', @match[4]) return @figure
Version data entries
10 entries across 10 versions & 1 rubygems