Explorar o código

added comment regarding line breaks

Fabian Peter Hammerle %!s(int64=4) %!d(string=hai) anos
pai
achega
01af2e2f59
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      ical2vdir/__init__.py

+ 3 - 0
ical2vdir/__init__.py

@@ -93,6 +93,9 @@ def _write_event(event: icalendar.cal.Event, path: pathlib.Path):
         prefix="ical2vdir-", suffix=_VDIR_EVENT_FILE_EXTENSION
     )
     try:
+        # > Content lines are delimited by a line break,
+        # > which is a CRLF sequence [...]
+        # https://tools.ietf.org/html/rfc5545#section-3.1
         os.write(temp_fd, event.to_ical())
         os.close(temp_fd)
         os.rename(temp_path, path)