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

This comment has been minimized.

@Kwpolska

Kwpolska May 8, 2017
Member

leftover 1



class Plugin(ShortcodePlugin):
"""Plugin for gist directive."""

This comment has been minimized.

@Kwpolska

Kwpolska May 8, 2017
Member

leftover 2

@Kwpolska
Copy link
Member

@Kwpolska 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 added 2 commits May 8, 2017
@ralsina
Copy link
Member Author

@ralsina 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 Kwpolska commented May 8, 2017

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

@ralsina
Copy link
Member Author

@ralsina 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

This comment has been minimized.

@Kwpolska

Kwpolska May 9, 2017
Member

Add a link to the repo somewhere.

@ralsina
Copy link
Member Author

@ralsina ralsina commented May 9, 2017

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

This comment has been minimized.

@Kwpolska

Kwpolska May 9, 2017
Member

No comma here.

ralsina added 2 commits May 9, 2017
@ralsina ralsina merged commit c5b86a4 into master May 9, 2017
0 of 4 checks passed
0 of 4 checks passed
continuous-integration/appveyor/branch Waiting for AppVeyor build to complete
Details
continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
continuous-integration/travis-ci/push The Travis CI build is in progress
Details
@ralsina ralsina deleted the emoji-sc branch May 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants