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

Added support for @@include tag which will allow embedding html/markdown files from the '_partial' folder #31

Merged
merged 1 commit into from
Mar 9, 2016

Conversation

seemantr
Copy link
Contributor

@seemantr seemantr commented Mar 7, 2016

Done changes as per our discussion. Unfortunately this is not recursive in terms of include tags but that can be easily added at a later point of time. I have to send a new PR as I wanted to base it on your latest changes.

@FransBouma
Copy link
Owner

I think you can commit to a PR or update a PR, though I don't know specifics about that. (I often see 'commented on an outdated PR' in other repos, so it should be possible.

Anyway, on to your contribution: :) It's not a big deal it's not recursive, I'll add an issue that it should be updated.

What I'll do post merge though is change the default. I don't like the '_partial' default, so I'll change that. As that will break your own code, I'll add a docnet.json setting for configuring the include folder so you can keep using '_partial', which you likely chose to meet your own setup. :)

In my template engine in LLBLGen Pro I've implemented a recursive template include parser directive some years ago so it's not a big problem for me to implement that later on.

Thanks!

@seemantr
Copy link
Contributor Author

seemantr commented Mar 9, 2016

Thanks @FransBouma. Will search Github manuals to understand how to update a PR :-). I also remember seeing people update a PR.

Renaming partial folder is not an issue for me. I will rename my folder. So, not a big deal. Feel free to do what ever you feel is the easiest option for you. Around recursive parsing, I can also push something in few weeks. To be honest I find C# and recursion to be very cumbersome as I code in F# most of the time where writing tail recursive code is amazing :).

@FransBouma FransBouma merged commit 6e9c27d into FransBouma:master Mar 9, 2016
FransBouma added a commit that referenced this pull request Mar 9, 2016
FransBouma added a commit that referenced this pull request Mar 9, 2016
@FransBouma
Copy link
Owner

The regexp is a bit of a problem though: @@include("foo.htm") also includes the "" in the matched filename. I assumed quotes were in order, as that's in general the intuitive way to go I think. It also matches directives given inside code blocks, which is a bit of a problem documenting this feature, but not really for many other situations.

I'll correct the quotes issue for now in the code directly (stripping them off) and will file an issue moving this to the span parser in markdowndeep :)

@FransBouma
Copy link
Owner

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.

2 participants