-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature #3737 Added configuration for commonmark use in twig-extra-bu…
…ndle. (doekenorg) This PR was merged into the 3.x branch. Discussion ---------- Added configuration for commonmark use in twig-extra-bundle. Following this tweet: https://twitter.com/ramsey/status/1561894460560138241, this PR adds the configuration options for `commonmark` to the `twig-extra-bundle`. The configuration is added to the `LeagueCommonMarkConverterFactory` and in turn injected in the `CommonMarkConverter`. This way a user can provide the configuration for usage inside twig. I'm not sure if adding the configuration inside the extension is the way to go. Hope this helps out at least `@ramsey` :-) Added `ignoreExtraKeys` to be somewhat future proof in case extra configuration is added later on, and also to be able to provide de configuration for extensions. Commits ------- 6f20629 Added configuration for commonmark use in twig-extra-bundle.
- Loading branch information
Showing
4 changed files
with
92 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
3cdf26f
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.
I think this should have a defaultValue, otherwise
bin/console config:dump twig_extra > config/packages/twig_extra.yaml
generates a null default, which doesn't validate.
There's also an issue with the default values for unordered_list_markers, being an array of arrays, instead of just an array, and the array values need quotes since * is reserved in yaml:
3cdf26f
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.
@tacman Would you like to create a PR to "fix" these issues?
3cdf26f
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.
I can try! Question: when I'm modifying a symfony bundle or component, I use the "link" command to symlink my project to the local Symfony repo. Is there a shortcut like that for linking this bundle (twig-extra-bundle), since that's not in the Symfony repo?
3cdf26f
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.
No, there is nothing similar