Browse Source

Remove unused bits

tags/v0.3
Dashie der otter 1 year ago
parent
commit
c8a06f3d46
Signed by: Dashie <dashie@sigpipe.me> GPG Key ID: C2D57B325840B755
3 changed files with 2 additions and 17 deletions
  1. 1
    1
      conf/app.ini
  2. 1
    1
      setting/setting.go
  3. 0
    15
      stuff/markup/markup.go

+ 1
- 1
conf/app.ini View File

@@ -20,7 +20,7 @@ STATIC_ROOT_PATH =
; Either "mysql", "postgres" or "sqlite3", you can connect to TiDB with MySQL protocol
DB_TYPE = sqlite3
HOST = 127.0.0.1:3306
NAME = gogs
NAME = gittxt
USER = root
PASSWD =
; For "postgres" only, either "disable", "require" or "verify-full"

+ 1
- 1
setting/setting.go View File

@@ -369,7 +369,7 @@ func initLogging() {
}

case log.FILE:
logPath := path.Join(LogRootPath, "gogs.log")
logPath := path.Join(LogRootPath, "git.txt.log")
if err = os.MkdirAll(path.Dir(logPath), os.ModePerm); err != nil {
log.Fatal(2, "Fail to create log directory '%s': %v", path.Dir(logPath), err)
}

+ 0
- 15
stuff/markup/markup.go View File

@@ -27,21 +27,6 @@ var (
// MentionPattern matches string that mentions someone, e.g. @Unknwon
MentionPattern = regexp.MustCompile(`(\s|^|\W)@[0-9a-zA-Z-_\.]+`)

// CommitPattern matches link to certain commit with or without trailing hash,
// e.g. https://try.gogs.io/gogs/gogs/commit/d8a994ef243349f321568f9e36d5c3f444b99cae#diff-2
CommitPattern = regexp.MustCompile(`(\s|^)https?.*commit/[0-9a-zA-Z]+(#+[0-9a-zA-Z-]*)?`)

// IssueFullPattern matches link to an issue with or without trailing hash,
// e.g. https://try.gogs.io/gogs/gogs/issues/4#issue-685
IssueFullPattern = regexp.MustCompile(`(\s|^)https?.*issues/[0-9]+(#+[0-9a-zA-Z-]*)?`)
// IssueNumericPattern matches string that references to a numeric issue, e.g. #1287
IssueNumericPattern = regexp.MustCompile(`( |^|\()#[0-9]+\b`)
// IssueAlphanumericPattern matches string that references to an alphanumeric issue, e.g. ABC-1234
IssueAlphanumericPattern = regexp.MustCompile(`( |^|\()[A-Z]{1,10}-[1-9][0-9]*\b`)
// CrossReferenceIssueNumericPattern matches string that references a numeric issue in a difference repository
// e.g. gogits/gogs#12345
CrossReferenceIssueNumericPattern = regexp.MustCompile(`( |^)[0-9a-zA-Z-_\.]+/[0-9a-zA-Z-_\.]+#[0-9]+\b`)

// Sha1CurrentPattern matches string that represents a commit SHA, e.g. d8a994ef243349f321568f9e36d5c3f444b99cae
// FIXME: this pattern matches pure numbers as well, right now we do a hack to check in RenderSha1CurrentPattern
// by converting string to a number.

Loading…
Cancel
Save