Fix rendering of wiki page list if wiki repo contains other files (#3454)
* Fix rendering of wiki page list if wiki repo contains other files * Improve wiki filename tests
This commit is contained in:
parent
b16c84de7b
commit
283e87d814
4 changed files with 26 additions and 2 deletions
|
@ -216,6 +216,21 @@ func (err ErrWikiReservedName) Error() string {
|
|||
return fmt.Sprintf("wiki title is reserved: %s", err.Title)
|
||||
}
|
||||
|
||||
// ErrWikiInvalidFileName represents an invalid wiki file name.
|
||||
type ErrWikiInvalidFileName struct {
|
||||
FileName string
|
||||
}
|
||||
|
||||
// IsErrWikiInvalidFileName checks if an error is an ErrWikiInvalidFileName.
|
||||
func IsErrWikiInvalidFileName(err error) bool {
|
||||
_, ok := err.(ErrWikiInvalidFileName)
|
||||
return ok
|
||||
}
|
||||
|
||||
func (err ErrWikiInvalidFileName) Error() string {
|
||||
return fmt.Sprintf("Invalid wiki filename: %s", err.FileName)
|
||||
}
|
||||
|
||||
// __________ ___. .__ .__ ____ __.
|
||||
// \______ \__ _\_ |__ | | |__| ____ | |/ _|____ ___.__.
|
||||
// | ___/ | \ __ \| | | |/ ___\ | <_/ __ < | |
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue