-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
simon/i26 emoji helper functions (#56)
* add emoji parsing and a few helper functions * update changelog and readme * wasm api demo and readme * add two failing cases that I found while making the web demo * also test if all desktop set emojis are counted as one emoji currently fails on region flags * fix region flags * fix bug cause by faulty skin tone range * cargo fmt * fix fmt
- Loading branch information
1 parent
bbf5061
commit f010384
Showing
11 changed files
with
420 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,14 +36,26 @@ | |
border-radius: 2px; | ||
padding: 2px; | ||
} | ||
|
||
table, | ||
td, | ||
tr { | ||
border: 1px solid grey; | ||
border-collapse: collapse; | ||
} | ||
td { | ||
padding: 3px; | ||
} | ||
</style> | ||
<h1>Message Parser</h1> | ||
<h3>Input</h3> | ||
<textarea | ||
name="content" | ||
id="input" | ||
style="width: calc(100% - 10px)" | ||
rows="10" | ||
>Sample message. | ||
> | ||
Sample message. | ||
#sampleHashtag | ||
https://example.com/example | ||
[email protected] | ||
|
@@ -59,7 +71,8 @@ <h3>Input</h3> | |
print("And, of course") | ||
print("A code block") | ||
``` | ||
</textarea> | ||
</textarea | ||
> | ||
<label for="parse_mode">Mode: </label> | ||
<select name="parse_mode" id="parse_mode"> | ||
<option value="text">TEXT Only</option> | ||
|
@@ -88,6 +101,25 @@ <h3>Output - AST</h3> | |
border: 1px solid lightgray; | ||
" | ||
></pre> | ||
|
||
<h1>Emoji Helpers</h1> | ||
|
||
<table> | ||
<thead> | ||
<tr> | ||
<td>Input</td> | ||
<td>First Emoji</td> | ||
<td>Emoji count if only emojis</td> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr> | ||
<td><input type="text" id="emoji-test" /></td> | ||
<td id="emoji-test-first"></td> | ||
<td id="emoji-test-count"></td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
<script type="module" src="example.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.