bugfix: content missmatch
This commit is contained in:
@@ -3,7 +3,15 @@
|
|||||||
# See https://datatracker.ietf.org/doc/html/rfc5545 for the RFC 5545 that
|
# See https://datatracker.ietf.org/doc/html/rfc5545 for the RFC 5545 that
|
||||||
# describes iCalendar, and its syntax
|
# describes iCalendar, and its syntax
|
||||||
|
|
||||||
# unescape
|
# Make string single-line
|
||||||
|
#
|
||||||
|
# @input str: String
|
||||||
|
# @return: String without newlines
|
||||||
|
function singleline(str) {
|
||||||
|
gsub("\\n", " ", str)
|
||||||
|
return str
|
||||||
|
}
|
||||||
|
|
||||||
# Isolate and unescape the content part of an iCalendar line.
|
# Isolate and unescape the content part of an iCalendar line.
|
||||||
#
|
#
|
||||||
# @local variables: tmp
|
# @local variables: tmp
|
||||||
@@ -18,7 +26,6 @@ function unescape(str) {
|
|||||||
return str
|
return str
|
||||||
}
|
}
|
||||||
|
|
||||||
# getcontent
|
|
||||||
# Isolate content part of an iCalendar line, and unescape.
|
# Isolate content part of an iCalendar line, and unescape.
|
||||||
#
|
#
|
||||||
# @input str: String
|
# @input str: String
|
||||||
@@ -27,17 +34,6 @@ function getcontent(str) {
|
|||||||
return unescape(substr(str, index(str, ":") + 1))
|
return unescape(substr(str, index(str, ":") + 1))
|
||||||
}
|
}
|
||||||
|
|
||||||
function storetext_line(content_line, c, prop)
|
|
||||||
{
|
|
||||||
c[prop] = getcontent(content_line, prop);
|
|
||||||
gsub("\\\\n", " ", c[prop]);
|
|
||||||
gsub("\\\\N", " ", c[prop]);
|
|
||||||
gsub("\\\\,", ",", c[prop]);
|
|
||||||
gsub("\\\\;", ";", c[prop]);
|
|
||||||
gsub("\\\\\\\\", "\\", c[prop]);
|
|
||||||
#gsub(" ", "_", c[prop]);
|
|
||||||
}
|
|
||||||
|
|
||||||
# formatdate
|
# formatdate
|
||||||
# Generate kind-of-pretty date strings.
|
# Generate kind-of-pretty date strings.
|
||||||
#
|
#
|
||||||
@@ -109,7 +105,6 @@ BEGINFILE {
|
|||||||
type = "";
|
type = "";
|
||||||
prop = "";
|
prop = "";
|
||||||
delete c;
|
delete c;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/^BEGIN:(VJOURNAL|VTODO)/ {
|
/^BEGIN:(VJOURNAL|VTODO)/ {
|
||||||
@@ -155,10 +150,10 @@ ENDFILE {
|
|||||||
|
|
||||||
# Process content lines
|
# Process content lines
|
||||||
# strings
|
# strings
|
||||||
cat = unescape(getcontent(c["CATEGORIES"]))
|
cat = singleline(unescape(getcontent(c["CATEGORIES"])))
|
||||||
des = unescape(getcontent(c["DESCRIPTION"]))
|
des = singleline(unescape(getcontent(c["DESCRIPTION"])))
|
||||||
sta = unescape(getcontent(c["STATUS"]))
|
sta = singleline(unescape(getcontent(c["STATUS"])))
|
||||||
sum = unescape(getcontent(c["SUMMARY"]))
|
sum = singleline(unescape(getcontent(c["SUMMARY"])))
|
||||||
|
|
||||||
# integers
|
# integers
|
||||||
pri = unescape(getcontent(c["PRIORITY"]))
|
pri = unescape(getcontent(c["PRIORITY"]))
|
||||||
@@ -177,6 +172,7 @@ ENDFILE {
|
|||||||
|
|
||||||
# Priority field, primarly used for sorting
|
# Priority field, primarly used for sorting
|
||||||
psort = 0;
|
psort = 0;
|
||||||
|
priotext = ""
|
||||||
if (pri > 0)
|
if (pri > 0)
|
||||||
{
|
{
|
||||||
priotext = "❗(" pri ") "
|
priotext = "❗(" pri ") "
|
||||||
@@ -206,7 +202,7 @@ ENDFILE {
|
|||||||
summarycolor = RED;
|
summarycolor = RED;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
d = c["DTSTART"];
|
d = dts
|
||||||
}
|
}
|
||||||
d = d ? formatdate(d, todaystamp) : " ";
|
d = d ? formatdate(d, todaystamp) : " ";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user