Skip to content
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

Emoji shortcode #2748

Merged
merged 7 commits into from May 9, 2017
Merged

Emoji shortcode #2748

merged 7 commits into from May 9, 2017

Conversation

ralsina
Copy link
Member

@ralsina ralsina commented May 8, 2017

Pull Request Checklist

  • I’ve read the guidelines for contributing.
  • I updated AUTHORS.txt and CHANGES.txt (if the change is non-trivial) and documentation (if applicable).
  • I tested my changes.

Description

A simple shortcode for emoji support: {{% emoji cry_face %}}

@@ -0,0 +1,46 @@
# -*- coding: utf-8 -*-
# This file is public domain according to its author, Brian Hsu
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

leftover 1



class Plugin(ShortcodePlugin):
"""Plugin for gist directive."""
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

leftover 2

@Kwpolska
Copy link
Member

Kwpolska commented May 8, 2017

Looks good, but perhaps we could merge all those JSON files into a more compact, manageable format of {name: icon}?

@ralsina
Copy link
Member Author

ralsina commented May 8, 2017

@Kwpolska yeah, I could merge them but then I would need to do it again if I ever refresh that data.

@Kwpolska
Copy link
Member

Kwpolska commented May 8, 2017

@ralsina I didn’t expect you to do it by hand.

@ralsina
Copy link
Member Author

ralsina commented May 8, 2017

Also, there are two turkey emojis! (bird and country, I guess)

@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2016 -2017 Shayan Rais
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a link to the repo somewhere.

@ralsina
Copy link
Member Author

ralsina commented May 9, 2017 via email

output = '''<span class="emoji">{}</span>'''.format(TABLE[name])
except KeyError:
LOGGER.warning('Unknown emoji {}'.format(name))
output = '''<span class="emoji, error">{}</span>'''.format(name)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No comma here.

@ralsina ralsina merged commit c5b86a4 into master May 9, 2017
@ralsina ralsina deleted the emoji-sc branch May 9, 2017 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants