escape characters in draft-2 v. 1.0

mmahmmah Member, Broadie ✭✭

I am trying to produce a WDL string that contains the character ". In my real code, the string will also contain ', so in this simplified example, I am trying to construct a string with " that also contains ".

This validates and runs as a draft-2 WDL.

workflow example{
    call print{
    }
}

task print{
    String s = "\""
    command{
        echo "${s}"
    }
}

I am trying to write a version 1.0 WDL, but this does not validate.

version 1.0
workflow example{
    call print{
    }
}

task print{
    input{
        String s = "\""
    }
    command{
        echo "${s}"
    }
}

The spec seems to indicate that the correct escape sequence should be \\", that is I expect

String s = "\\""

but this works neither for a draft-2 WDL nor for 1.0. How do I escape a " character in WDL 1.0?

Answers

Sign In or Register to comment.