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

Custom handlebars delimiters #422

Merged
merged 5 commits into from Jun 29, 2018

Conversation

Projects
None yet
3 participants
@marcinczeczko
Contributor

marcinczeczko commented May 28, 2018

Description

There are use cases in which the template to be rendered by Knot.x consists of handlebars scripts that are to be interpreted client side e.g. using Angular. In order to do so, an Angular variables, expressions must not be processed by the Knot.x.
In order to enable this, there is a need to have Handlebars delimiters configured so, the developer might chose to use [< and ]>' delimiters instead of {{and}}`

Motivation and Context

  • To split the HBS script between server-side and client side

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

I hereby agree to the terms of the Knot.x Contributor License Agreement.

@@ -83,6 +83,12 @@ public void whenRequestingLocalSimplePageWithGet_expectLocalSimpleHtml(TestConte
testGetRequest(context, LOCAL_REQUEST_URI, "localSimpleResult.html");
}
@Test
@KnotxConfiguration("knotx-test-app-custom-symbol.json")

This comment has been minimized.

@Skejven

Skejven Jun 4, 2018

Contributor

It may be worth to add one additional tests - set custom symbol, but also use the default in the processed snippet markup. Expect custom symbols processed, but {{ and }} left for latter processing by any other scripts/engines (e.g. angular).

@Skejven

Skejven Jun 4, 2018

Contributor

It may be worth to add one additional tests - set custom symbol, but also use the default in the processed snippet markup. Expect custom symbols processed, but {{ and }} left for latter processing by any other scripts/engines (e.g. angular).

This comment has been minimized.

@marcinczeczko

marcinczeczko Jun 4, 2018

Contributor

Fixed

@marcinczeczko

marcinczeczko Jun 4, 2018

Contributor

Fixed

marcinczeczko added some commits Jun 29, 2018

@marcinczeczko marcinczeczko merged commit b66132d into master Jun 29, 2018

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@Skejven Skejven deleted the feature/custom-hbs-delimiter branch Jun 30, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment