-
Notifications
You must be signed in to change notification settings - Fork 4
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
Overwork content merge #36
Conversation
* Start merging with 'layout' fragmnent * introduced name filed for content
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 major blockers, but i do not like the //TODO comment. All in all the code is better now than it was before :)
f, found := cntx.Body[name] | ||
|
||
// Normalize main# as main | ||
if !found && strings.HasSuffix(name, "#") { |
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.
Maybe "#" should be configurable or at least declared at the top because it is used more than once. ("magic string")
} | ||
func (cntx *ContentMerge) addBody(c Content) { | ||
|
||
for loalName, f := range c.Body() { |
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.
loalName -> localName
if strings.HasPrefix(placeholder, "#") { | ||
placeholder = placeholder[1:] | ||
} | ||
// TODO !!!!!!! How to handle the has in name resolving??? |
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.
Should a //TODO be merged into the master? Maybe you just forgot about it.
Resolved conflicts in test files.
Fetch Definitions now have a name, so that a fragment now can have a name of the form
page#fragment. The templating now starts with the 'layout' page.
Also I had to do some refactorings to do that.
I still have to do some documentation task, but please start reviewing.