-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Add Textile language #544
Add Textile language #544
Conversation
…m-textile Conflicts: components.js
Prism.languages.textile['phrase'].inside['image'].inside['modifier'].inside = Prism.util.clone(modifierTokens); | ||
|
||
// Allow some nesting | ||
Prism.languages.textile['phrase'].inside['inline'].inside['bold'].inside = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, a lot of repetition here. Why not define one object and clone it?
…m-textile Conflicts: components.js
@LeaVerou It should be more DRY now. Does it look good to you? |
Conflicts: components.js
Is cloning really needed? So what if they refer to the same object? It’s not like it’s mutated at any point. |
Well, I do not mutate it in any way but a plugin could. The last time I forgot to clone duplicated parts of the grammar, bad things happened (remember #469), so I thought prevention was better than cure. |
Conflicts: components.js
Conflicts: components.js
…x phrases, fix image title, simplified regexps, simplified nesting.
Preview of the examples: