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

Added additional classes #6

Closed
wants to merge 8 commits into from
Closed

Added additional classes #6

wants to merge 8 commits into from

Conversation

lukemorton
Copy link

I have added additional classes for styling particular characters, words and sentences by their contents and not just a counter. This allows font changes for certain letters and numbers, easier control over sentences (as long as the contents does not change), etc.

Luke

@lukemorton
Copy link
Author

var nonAlphanumeric = /[^a-z0-9_]/gi;

Shouldn't have the underscore, no need for any other characters apart from letters and numbers IMO.

@davatron5000
Copy link
Owner

I really like your solution, but I politely disagree that it only needs to be alphanumeric. I think the plugin should do its best accomodate non-English languages like Japanese or that weird German ß thing.

I also thing supporting punctuations like amperstands, quotes, and exclamation points would be extremely useful typographically.

What might be smart is to roll out a letterize submethod that will incorporate your code and/or add classes optionally in the meanwhile. I know a lot of people want this ability. Thoughts?

@lukemorton
Copy link
Author

Yeah I totally overlooked typography for non alphanumerics! I think the HTML entity equivalents would be the best solution i.e. standard quotes could be represented by .charquot, or perhaps just .quot, .amp for &, etc.

I think things get complex for full UTF 8 support however. It's getting late in England though, so I think I might revisit this tomorrow. Anyway great work on the plugin!

@maranomynet
Copy link

I'm not too fond of this particular class-name based approach.
Will roll my own now and send you a PR.

@davatron5000
Copy link
Owner

Going to put momentum here into #45. Thanks for your original commits @drpheltright. Appreciate it.

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.

3 participants