fix(XmbSerializer): add meaning attribute, escape attribute values

This commit is contained in:
Victor Berchet
2016-06-20 13:18:49 -07:00
parent e38e04c1c2
commit c9c81e1fbc
4 changed files with 31 additions and 11 deletions

View File

@ -216,7 +216,7 @@ export class StringWrapper {
return s.slice(from, to === null ? undefined : to);
}
static replaceAllMapped(s: string, from: RegExp, cb: Function): string {
static replaceAllMapped(s: string, from: RegExp, cb: (m: string[]) => string): string {
return s.replace(from, function(...matches: any[]) {
// Remove offset & string from the result array
matches.splice(-2, 2);