Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vdt-plugin
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
vdt-plugin
Commits
5c4264fe
Commit
5c4264fe
authored
Feb 03, 2014
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
accepting escaped quotes (\") in <output> command blocks.
parent
fbacc92b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
2 deletions
+20
-2
XMLConfig.java
src/com/elphel/vdt/core/tools/config/xml/XMLConfig.java
+20
-2
No files found.
src/com/elphel/vdt/core/tools/config/xml/XMLConfig.java
View file @
5c4264fe
...
@@ -267,12 +267,30 @@ public class XMLConfig extends Config {
...
@@ -267,12 +267,30 @@ public class XMLConfig extends Config {
if
(
isTextNode
(
node
))
{
if
(
isTextNode
(
node
))
{
// we need the raw text in this node
// we need the raw text in this node
String
text
=
node
.
getNodeValue
();
String
text
=
node
.
getNodeValue
();
String
[]
lines
=
text
.
split
(
"\""
);
String
[]
lines
=
text
.
split
(
"\""
);
// we need only lines enclosed in quotes
// we need only lines enclosed in quotes
// so in the 'lines' array we need only odd elems (1, 3, 5, ...)
// so in the 'lines' array we need only odd elems (1, 3, 5, ...)
for
(
int
k
=
1
;
k
<
lines
.
length
;
k
+=
2
)
/*
for(int k = 1; k < lines.length; k += 2) {
stringList.add(lines[k]);
stringList.add(lines[k]);
if (VerilogPlugin.getPreferenceBoolean(PreferenceStrings.DEBUG_OTHER))
System.out.println ("got quoted string: \""+lines[k]+"\"");
}
*/
//Andrey: modified to accept \"
String
line
=
null
;
for
(
int
k
=
1
;
k
<
lines
.
length
;
k
++){
if
(
line
==
null
){
line
=
lines
[
k
];
}
else
if
(
line
.
endsWith
(
"\\"
)){
// So it was \"
line
=
line
.
substring
(
0
,
line
.
length
()-
1
)+
"\""
+
lines
[
k
];
}
else
{
stringList
.
add
(
line
);
line
=
null
;
}
}
}
else
{
}
else
{
NodeList
childNodes
=
node
.
getChildNodes
();
NodeList
childNodes
=
node
.
getChildNodes
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment