ical4j ical 新线上的非法财产
我在使用 ical4j 解析 ical 文件时遇到问题。位置标记的格式如下:
UID:1
LOCATION:
Kingston Park
SEQUENCE:0
由于“Kingston Park”位于新行,因此我收到以下解析异常:
非法财产:Kingston Park
我已将relaxed opening 设置为 true。有什么办法可以忽略这条新线吗?
谢谢
I have an issue parsing an ical file using ical4j. The location tag is formatted as follows:
UID:1
LOCATION:
Kingston Park
SEQUENCE:0
Because 'Kingston Park' is on a new line, I get the following parsing exception:
Illegal Property: Kingston Park
I have set relaxed unfolding to true. Is there any way I can ignore this new line?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
唯一可行的方法是,在线路起点处的“Kingston Park”之前至少有一个空格。
原因是折叠行是通过行首的空格来标识的,每行开头没有空格的行都被视为新的内容行。
宽松的展开属性实际上只是允许非标准行终止符(即“\n”而不是“\r\n”),以及折叠行开头的制表符而不是空格。
The only way this will work is if there is at least one space preceding 'Kingston Park' at the start of the line.
The reason is that folded lines are identified by a space at the beginning of the line, and every line without a space at the beginning is regarded as a new content line.
The relaxed unfolding property is really just to allow for non-standard line terminators (i.e. '\n' rather than '\r\n'), and tabs at the beginning of folded lines rather than a space.