[wip] Add Handlebars support and escaping @@ tags in markdown code#34
Closed
vladnega wants to merge 2 commits intoFransBouma:masterfrom
Closed
[wip] Add Handlebars support and escaping @@ tags in markdown code#34vladnega wants to merge 2 commits intoFransBouma:masterfrom
vladnega wants to merge 2 commits intoFransBouma:masterfrom
Conversation
Handlebars support is enabled for the @@render function.
Owner
|
Please only ready-to-merge PRs with a single feature which is complete. A lot of code changes in your PR and it includes a change that was postponed (the htm->html) change, as it needs configuration and better handling (this is in progress). Your change alters the regexp, but that's not what is intended with #33. In #33, the parsing of @@include has to take place in the markdowndeep parser so context where @@include is used is taken into account. A regexp just matches everywhere and I don't want a parser relying on that. THe current code (with the regexp) is working but needs to be replaced by a non-regexp solution. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #33. You can now write the following in your markdown files and the
@@ tagwon't cause the respective function to be called:The above would simply generate the following in your final HTML file:
I've also added Handlebars partials support. This can be called in your markdown file using:
All functions return user friendly error messages to help him debug the code.
More functions like
includeandrendercan be easily added to the C# code. Please have a look at thePartialsSelectorfunction.