asciidoctor / asciidoctor-extensions-lab

A lab for testing and demonstrating Asciidoctor extensions. Please do not use this code in production. If you want to use one of these extensions in your application, create a new project, import the code, and distribute it as a RubyGem. You can then request to make it a top-level project under the Asciidoctor organization.
Other
105 stars 101 forks source link

Adds twemoji integration #29

Closed ggrossetie closed 9 years ago

ggrossetie commented 9 years ago

I think we need to abstract the size of emoji because twemoji-awesome is using lg, 2x, 3x... 5x and tortue is using pixel size. So you can't easily switch between implementation if you specified size.

mojavelinux commented 9 years ago

This looks truly awesome!

I think we should align on the sizes that FontAwesome / EmojiAwesome uses...just maintain a map internally to do the conversion. We'd need to pick appropriate pixels sizes for each of the named sizes. Perhaps something like:

1x = 17
lg = 24
2x = 34
3x = 50
4x = 68
5x = 85

We can always tweak the numbers.

ggrossetie commented 9 years ago
1x = 17
lg = 24
2x = 34
3x = 50
4x = 68
5x = 85

This is an excellent idea!

ggrossetie commented 9 years ago

@mojavelinux Could you please review this PR ?

mojavelinux commented 9 years ago

Yep! I sent a code review pull request. See commit message for details. Looking good!

mojavelinux commented 9 years ago

One additional thing I'd like to see is shorthand for writing emoji. This would be very similar to the mentions inline macro. We can do this in a separate pull request if you want. I just wanted to mention it.

GitHub-flavored markdown and other systems use the syntax of surrounding colons (e.g., :heart:). However, that's obviously going to conflict with document-level attribute entries. We could either use surrounding pipes (e.g., |heart|) or make the trailing colon optional like a Ruby symbol (e.g., :heart).

ggrossetie commented 9 years ago

I think :heart is better because it's closer to other well-known syntax. Plus when I want to add an emoji I usually start typing : then the name of the emoji but I never type the trailing colon so :heart feels natural.

Yep! I sent a code review pull request. See commit message for details. Looking good!

Thanks!

We can do this in a separate pull request if you want. I just wanted to mention it.

Yes I think it's better, I also want to Javascriptify this extension to make it available in the Chrome extension.

mojavelinux commented 9 years ago

:+1:

I share that instinct / habit. Let's move forward with the leading colon idea. On Jan 10, 2015 4:14 AM, "Guillaume Grossetie" notifications@github.com wrote:

I think :heart is better because it's closer to other well-known syntax. Plus when I want to add an emoji I usually start typing : then the name of the emoji but I never type the trailing colon so :heart feels natural.

Yep! I sent a code review pull request. See commit message for details. Looking good!

Thanks!

We can do this in a separate pull request if you want. I just wanted to mention it.

Yes I think it's better, I also want to Javascriptify this extension to make it available in the Chrome extension.

— Reply to this email directly or view it on GitHub https://github.com/asciidoctor/asciidoctor-extensions-lab/pull/29#issuecomment-69452320 .

mojavelinux commented 9 years ago

Nice work!

I think we're good to go. We'll address any enhancements or improvements (including the shorthand syntax) in follow-up pull requests.