-
Notifications
You must be signed in to change notification settings - Fork 14
Minor changes affecting Atom feed and Tag URLs #283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -51,6 +51,7 @@ def convert_markdown( | |
| * `date` is converted into datetime with local timezone | ||
| * `tags` is interpreted as a comma-separeted list of strings. | ||
| All strings are stripped and converted to lower case. | ||
| All strings have spaces replaced with dashes. | ||
|
|
||
| Parameters | ||
| ---------- | ||
|
|
@@ -85,6 +86,7 @@ def convert_markdown( | |
| tags = meta["tags"].split(",") | ||
| tags = [t.lower() for t in tags] | ||
| tags = [t.strip() for t in tags] | ||
| tags = [t.replace(" ","-") for t in tags] | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thise change seems reasonable, can you write a test case that ensures that the replace is working?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can certainly try, and I might also suggest changing it to:
in case of accidental double-spaces. |
||
| meta["tags"] = tags | ||
|
|
||
| return content, meta | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure this actually changes something? I think
utf8andutf-8are synonymous.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think they are synonymous, but after making that change my atom feed passed the W3C Feed Validation Test.
e.g. this atom feed compared to this one, both are valid.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very good catch, thank you! I've fixed this and added a test for correct encoding in a separate PR.