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

Add Textile language #544

Merged
merged 14 commits into from
Sep 6, 2015
Merged

Add Textile language #544

merged 14 commits into from
Sep 6, 2015

Conversation

Golmote
Copy link
Contributor

@Golmote Golmote commented Mar 9, 2015

Preview of the examples:

prism-textile

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 = {
Copy link
Member

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?

@Golmote
Copy link
Contributor Author

Golmote commented Mar 20, 2015

@LeaVerou It should be more DRY now. Does it look good to you?

@LeaVerou
Copy link
Member

Is cloning really needed? So what if they refer to the same object? It’s not like it’s mutated at any point.

@Golmote
Copy link
Contributor Author

Golmote commented Mar 21, 2015

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.

Golmote added a commit that referenced this pull request Sep 6, 2015
@Golmote Golmote merged commit d0c6764 into PrismJS:gh-pages Sep 6, 2015
@Golmote Golmote deleted the prism-textile branch September 6, 2015 09:22
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.

None yet

2 participants