Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed data-processing-sources to seperate files or ids by whitespace,…

… not just spaces [#1818]
  • Loading branch information...
commit 7bd81873c6e15cf1c4b46ff1095b841a03cba66f 2 parents 665c37b + 83e551d
Jon Buckley jbuck authored
4 examples/seneca/file and fragment loading (1818)/fafl.pde
View
@@ -0,0 +1,4 @@
+void setup() {
+ size(400,400);
+ noLoop();
+}
25 examples/seneca/file and fragment loading (1818)/index.html
View
@@ -0,0 +1,25 @@
+<!doctype html>
+<html>
+<head>
+ <title>File and fragment loading test (ticket 1818)</title>
+ <script type="text/javascript" src="../../../processing.js"></script>
+ <script type="text/processing" id="customcode">
+ void draw() {
+ background(255,255,100);
+ fill(0);
+ textAlign(CENTER);
+ text("custom code inclusion worked", width/2, height/2);
+ }
+ </script>
+</head>
+<body>
+
+ <h1>Mixed from-file and from-fragment loading of sketches</h1>
+
+ <p>This should show a yellowish sketch, with the text "custom code inclusion worked", centered.</p>
+
+ <canvas id="t1818test" data-processing-sources="fafl.pde
+ #customcode
+ "></canvas>
+</body>
+</html>
4 processing.js
View
@@ -19816,7 +19816,7 @@
}
}
if (processingSources) {
- filenames = processingSources.split(' ');
+ filenames = processingSources.split(/\s+/g);
for (var j = 0; j < filenames.length;) {
if (filenames[j]) {
j++;
@@ -19857,7 +19857,7 @@
while (nextSibling && nextSibling.nodeType !== 1) {
nextSibling = nextSibling.nextSibling;
}
- if (nextSibling.nodeName.toLowerCase() === "canvas") {
+ if (nextSibling && nextSibling.nodeName.toLowerCase() === "canvas") {
canvas = nextSibling;
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.