-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
78 additions
and
16 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package entity | ||
|
||
import ( | ||
"github.com/gohugonet/hugoverse/pkg/doctree" | ||
) | ||
|
||
type PageShifter struct { | ||
*Shifter | ||
} | ||
|
||
func (s *PageShifter) Shift(n *PageTreesNode, dimension doctree.Dimension, exact bool) (*PageTreesNode, bool, doctree.DimensionFlag) { | ||
newNode, found := n.shift(dimension[doctree.DimensionLanguage.Index()], exact) | ||
if newNode != nil { | ||
if found { | ||
return newNode, true, doctree.DimensionLanguage | ||
} | ||
} | ||
|
||
return nil, false, doctree.DimensionNone | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package entity | ||
|
||
import ( | ||
"github.com/gohugonet/hugoverse/pkg/doctree" | ||
) | ||
|
||
type SourceShifter struct { | ||
*Shifter | ||
} | ||
|
||
func (s *SourceShifter) Shift(n *PageTreesNode, dimension doctree.Dimension, exact bool) (*PageTreesNode, bool, doctree.DimensionFlag) { | ||
newNode, found := n.shift(dimension[doctree.DimensionLanguage.Index()], exact) | ||
if newNode != nil { | ||
if found { | ||
return newNode, true, doctree.DimensionLanguage | ||
} | ||
return newNode, true, doctree.DimensionNone | ||
} | ||
|
||
return nil, false, doctree.DimensionNone | ||
} |
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