// Copyright 2017 The Gogs Authors. All rights reserved.// Use of this source code is governed by a MIT-style// license that can be found in the LICENSE file.packagemarkupimport("path/filepath""strings""github.com/chaseadamsio/goorgeous")varorgModeExtensions=[]string{".org"}// IsOrgModeFile reports whether name looks like a Org-mode file based on its extension.funcIsOrgModeFile(namestring)bool{extension:=strings.ToLower(filepath.Ext(name))for_,ext:=rangeorgModeExtensions{ifstrings.ToLower(ext)==extension{returntrue}}returnfalse}// RawOrgMode renders content in Org-mode syntax to HTML without handling special links.funcRawOrgMode(body[]byte,urlPrefixstring)[]byte{returngoorgeous.OrgCommon(body)}// OrgMode takes a string or []byte and renders to HTML in Org-mode syntax with special links.funcOrgMode(inputinterface{},urlPrefixstring,metasmap[string]string)[]byte{returnRender(ORG_MODE,input,urlPrefix,metas)}