Support vCard 4 LANG language-tag values
This commit is contained in:
@@ -1336,6 +1336,13 @@ macro genPropParsers(
|
||||
params = params))
|
||||
|
||||
of vtText:
|
||||
if pn == pnLang:
|
||||
parseCase[1] = genAst(contents, typeName, p):
|
||||
let valueType = params.getSingleValue("VALUE")
|
||||
if valueType.isSome and valueType.get != $vtLanguageTag:
|
||||
p.error("parameter 'VALUE' must have the value '" & $vtLanguageTag & "'")
|
||||
contents.add(ac(typeName(value: p.readTextValue)))
|
||||
else:
|
||||
parseCase[1] = genAst(contents, typeName, pt):
|
||||
p.validateType(params, pt)
|
||||
contents.add(ac(typeName(value: p.readTextValue)))
|
||||
|
||||
Reference in New Issue
Block a user