mirror of https://github.com/golang/go.git
present: fix newline parsing for go present
Pressing enter on editable go present code adds a new 'pre' html tag which isn't being handled properly. This fix in play.js adds a newline to the html is being parsed whenever it sees a 'pre' tag. Fixes golang/go#41139 Change-Id: I042d13999f4a8518fb282c4c5bfb3a5197215449 Reviewed-on: https://go-review.googlesource.com/c/tools/+/251697 Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
This commit is contained in:
parent
2364a5e8fd
commit
76a6aac657
|
|
@ -12,7 +12,7 @@ function initPlayground(transport) {
|
|||
if (n.nodeType === 1) {
|
||||
if (n.tagName === 'BUTTON') continue;
|
||||
if (n.tagName === 'SPAN' && n.className === 'number') continue;
|
||||
if (n.tagName === 'DIV' || n.tagName == 'BR') {
|
||||
if (n.tagName === 'DIV' || n.tagName === 'BR' || n.tagName === 'PRE') {
|
||||
s += '\n';
|
||||
}
|
||||
s += text(n);
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue