Support RFC 5545 property names and custom properties#16
Support RFC 5545 property names and custom properties#16rickychilcott merged 6 commits intomasterfrom
Conversation
|
@meitar can you give this a once over and see if this looks ok to you. I use iCalendar's properties (and custom priorities) to tell us what to expose as opposed to hard coding it. It works for me, maybe you can test out in your context? |
|
Hmm, using 8871be2 in my templates I get this error: A The relevant call to the plugin in my Jekyll layout is: |
|
Whoops. You're right. Let me fix that up here right now. |
|
1834677 fixes the unexposed |
| context["event"].transform_values do |value| | ||
| v = case value | ||
| when String | ||
| value.force_encoding("UTF-8") | ||
| when Date | ||
| value.to_time | ||
| else | ||
| value | ||
| end | ||
|
|
||
| v.presence | ||
| end |
There was a problem hiding this comment.
Forcing encoding to utf8
There was a problem hiding this comment.
Line 78 in this file should also include a match against Icalendar::Values::Text, so I think the block should be:
| context["event"].transform_values do |value| | |
| v = case value | |
| when String | |
| value.force_encoding("UTF-8") | |
| when Date | |
| value.to_time | |
| else | |
| value | |
| end | |
| v.presence | |
| end | |
| context["event"].transform_values do |value| | |
| v = case value | |
| when String, Icalendar::Values::Text | |
| value.force_encoding("UTF-8") | |
| when Date | |
| value.to_time | |
| else | |
| value | |
| end | |
| v.presence | |
| end |
See this comment.
|
Do you have a feed that I can test against? I am forcing encoding in
https://github.com/Rakefire/jekyll-ical-tag/pull/16/files#r40563789 so I'm
not sure I know why it's not working.
ᐧ
…On Wed, Apr 8, 2020 at 12:02 PM 0xACAB ***@***.***> wrote:
1834677
<1834677>
fixes the unexposed dtstart, but now I get the Liquid Exception:
incompatible character encodings: ASCII-8BIT and UTF-8 error again. I
think there the refactoring dropped the call to as_utf8 at some point.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#16 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADM2P4HAD4UWDTQNQLPU6DRLSNXVANCNFSM4MD5CIJQ>
.
--
Ricky Chilcott
---
Partner
Rakefire
|
Here's one that fails with the above error for me: https://www.google.com/calendar/ical/ctftime%40gmail.com/public/basic.ics |
|
Thanks I'll try with that. Also, which version of Ruby are you on? |
$ ruby --version
ruby 2.6.5p114 (2019-10-01 revision 67812) [x86_64-darwin18] |
|
I think it's failing because but just |
|
Yep. That was it. It should be fixed now. Sorry for that little dance. |
Yup, this looks good to me. All my various templates build correctly now. If you publish this on RubyGems I can kill my fork. Thanks so much!
No stress, and if I may say so, thanks for the quick replies. I'm not used to people responding so quickly, so I normally do a helluva lot more debugging on my own before I ever even think about responding. But you were, like, right there within seconds. Saved me a lot of time, and helped me hone my Ruby far less painfully than I'm used to in the process. Again, thanks. :) |
|
Not a problem. That was fun over the past few days! Thanks for your great code contributions and for pushing this plugin to be better. Best of luck and stay well in this season. |
|
Version 1.1.0 has been published. |
You too! |
Close #10
Close #14