Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
peach-html5-editor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
partly implemented: click to place cursor
[peach-html5-editor.git]
/
parser.coffee
diff --git
a/parser.coffee
b/parser.coffee
index
509e492
..
7992244
100644
(file)
--- a/
parser.coffee
+++ b/
parser.coffee
@@
-43,11
+43,11
@@
#
# Call it like this:
#
#
# Call it like this:
#
-# wheic_parser.parse("<p><b>hi</p>")
+# peach_parser.parse("<p><b>hi</p>")
#
# Or, if you don't want <html><head><body>/etc, do this:
#
#
# Or, if you don't want <html><head><body>/etc, do this:
#
-# wheic_parser.parse("<p><b>hi</p>", {fragment: "body"})
+# peach_parser.parse("<p><b>hi</p>", {fragment: "body"})
#
# return value is an array of Nodes, see "class Node" below.
#
# return value is an array of Nodes, see "class Node" below.
@@
-80,8
+80,8
@@
if (typeof module) isnt 'undefined' and module.exports?
exports = module.exports
else
context = 'browser'
exports = module.exports
else
context = 'browser'
- window.wheic_parser = {}
- exports = window.wheic_parser
+ window.peach_parser = {}
+ exports = window.peach_parser
from_code_point = (x) ->
if String.fromCodePoint?
from_code_point = (x) ->
if String.fromCodePoint?
@@
-1246,6
+1246,7
@@
parse_html = (args_html, args = {}) ->
prev.text += t.text
return
dest[0].children.splice dest[1], 0, t
prev.text += t.text
return
dest[0].children.splice dest[1], 0, t
+ t.parent = dest[0]
return
# 8.2.5 http://www.w3.org/TR/html5/syntax.html#tree-construction
return
# 8.2.5 http://www.w3.org/TR/html5/syntax.html#tree-construction