mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 01:59:02 +00:00
Cmake docbook export: Try to handle quotation marks in parameter values properly
This commit is contained in:
parent
b62c6e8961
commit
decc775834
@ -69,17 +69,19 @@ sub handlePara($)
|
||||
if ($para =~ /^\s*([a-z]+(:[a-z]+)?)\s*=\s*(.*)$/) {
|
||||
my $val;
|
||||
my ($p, $rest) = ($1, $3);
|
||||
if ($rest =~ /^(\'[^\']*\')(.*)$/) {
|
||||
if ($rest =~ /^(\'([^\']|\\\')*\')(.*)$/) {
|
||||
$val = $1;
|
||||
$rest = $2;
|
||||
$rest = $3;
|
||||
}
|
||||
elsif ($rest =~ /^(\"[^\"]*\")(.*)$/) {
|
||||
elsif ($rest =~ /^(\"([^\"]|\\\")*\")(.*)$/) {
|
||||
$val = $1;
|
||||
$rest = $2;
|
||||
$rest = $3;
|
||||
}
|
||||
elsif ($rest =~ /^([^\s]+)(.*)$/) {
|
||||
$val = '"' . $1 . '"';
|
||||
my $val1 = $1
|
||||
$rest = $2;
|
||||
$val1 =~ s/([\"\'\\])/\\$1/g;
|
||||
$val = '"' . $val1 . '"';
|
||||
}
|
||||
else {
|
||||
die("param error for rest = $rest");
|
||||
|
Loading…
Reference in New Issue
Block a user