// renderOptions copies client options and applies opts.
427703
func (c *Client) renderOptions(opts []grpc.CallOption) (*Options, error) {
	var options *Options
	if c.Options != nil {
		cpy := *c.Options
		options = &cpy
	} else {
		options = DefaultOptions()
	}
	if err := options.apply(opts); err != nil {
		return nil, err
	}
	return options, nil
}
976631
func OrgOptions(input []byte, renderer blackfriday.Renderer) []byte {
	// in the case that we need to render something in isEmpty but there isn't a new line char
	input = append(input, '\n')
	var output bytes.Buffer

	p := NewParser(renderer)

	scanner := bufio.NewScanner(bytes.NewReader(input))
	// used to capture code blocks
	marker := ""
	syntax := ""
	listType := ""
	inParagraph := false
	inList := false
	inTable := false
	inFixedWidthArea := false
	inFootNote := false
	curFootNoteId := ""
	var tmpBlock bytes.Buffer

	for scanner.Scan() {
		data := scanner.Bytes()

		if !isEmpty(data) && isComment(data) || IsKeyword(data) {
			switch {
			case inList:
				if tmpBlock.Len() > 0 {
					p.generateList(&output, tmpBlock.Bytes(), listType)
				}
				inList = false
				listType = ""
				tmpBlock.Reset()
			case inTable:
				if tmpBlock.Len() > 0 {
					p.generateTable(&output, tmpBlock.Bytes())
				}
				inTable = false
				tmpBlock.Reset()
			case inParagraph:
				if tmpBlock.Len() > 0 {
					p.generateParagraph(&output, tmpBlock.Bytes()[:len(tmpBlock.Bytes())-1])
				}
				inParagraph = false
				tmpBlock.Reset()
			case inFixedWidthArea:
				if tmpBlock.Len() > 0 {
					tmpBlock.WriteString("</pre>\n")
					output.Write(tmpBlock.Bytes())
				}
				inFixedWidthArea = false
				tmpBlock.Reset()
			case inFootNote:
				inFootNote = false
				curFootNoteId = ""
			}

		}

		switch {
		case isEmpty(data):
			switch {
			case inList:
				if tmpBlock.Len() > 0 {
					p.generateList(&output, tmpBlock.Bytes(), listType)
				}
				inList = false
				listType = ""
				tmpBlock.Reset()
			case inTable:
				if tmpBlock.Len() > 0 {
					p.generateTable(&output, tmpBlock.Bytes())
				}
				inTable = false
				tmpBlock.Reset()
			case inParagraph:
				if tmpBlock.Len() > 0 {
					p.generateParagraph(&output, tmpBlock.Bytes()[:len(tmpBlock.Bytes())-1])
				}
				inParagraph = false
				tmpBlock.Reset()
			case inFixedWidthArea:
				if tmpBlock.Len() > 0 {
					tmpBlock.WriteString("</pre>\n")
					output.Write(tmpBlock.Bytes())
				}
				inFixedWidthArea = false
				tmpBlock.Reset()
			case inFootNote:
				inFootNote = false
				curFootNoteId = ""
			case marker != "":
				tmpBlock.WriteByte('\n')
			default:
				continue
			}
		case isPropertyDrawer(data) || marker == "PROPERTIES":
			if marker == "" {
				marker = "PROPERTIES"
			}
			if bytes.Equal(data, []byte(":END:")) {
				marker = ""
			}
			continue
		case isBlock(data) || marker != "":
			matches := reBlock.FindSubmatch(data)
			if len(matches) > 0 {
				if string(matches[1]) == "END" {
					switch marker {
					case "QUOTE":
						var tmpBuf bytes.Buffer
						p.inline(&tmpBuf, tmpBlock.Bytes())
						p.r.BlockQuote(&output, tmpBuf.Bytes())
					case "CENTER":
						var tmpBuf bytes.Buffer
						output.WriteString("<center>\n")
						p.inline(&tmpBuf, tmpBlock.Bytes())
						output.Write(tmpBuf.Bytes())
						output.WriteString("</center>\n")
					default:
						tmpBlock.WriteByte('\n')
						p.r.BlockCode(&output, tmpBlock.Bytes(), syntax)
					}
					marker = ""
					tmpBlock.Reset()
					continue
				}

			}
			if marker != "" {
				if marker != "SRC" && marker != "EXAMPLE" {
					var tmpBuf bytes.Buffer
					tmpBuf.Write([]byte("<p>\n"))
					p.inline(&tmpBuf, data)
					tmpBuf.WriteByte('\n')
					tmpBuf.Write([]byte("</p>\n"))
					tmpBlock.Write(tmpBuf.Bytes())

				} else {
					if !(tmpBlock.Len() == 0 && (marker == "SRC" || marker == "EXAMPLE")) {
						tmpBlock.WriteByte('\n')
					}
					tmpBlock.Write(data)
				}

			} else {
				marker = string(matches[2])
				syntax = string(matches[3])
			}
		case isFootnoteDef(data) || inFootNote:
			if isFootnoteDef(data) {
				matches := reFootnoteDef.FindSubmatch(data)
				for i := range p.notes {
					if p.notes[i].id == string(matches[1]) {
						p.notes[i].def = string(matches[2])
						inFootNote = true
						curFootNoteId = string(matches[1])
					}
				}
			} else if inFootNote {
				for i := range p.notes {
					if p.notes[i].id == curFootNoteId {
						p.notes[i].def += " "
						p.notes[i].def += string(data)
					}
				}
			}
		case isTable(data):
			if inTable != true {
				inTable = true
			}
			tmpBlock.Write(data)
			tmpBlock.WriteByte('\n')
		case IsKeyword(data):
			continue
		case isComment(data):
			p.generateComment(&output, data)
		case isHeadline(data):
			p.generateHeadline(&output, data)
		case isDefinitionList(data):
			if inList != true {
				listType = "dl"
				inList = true
			}
			var work bytes.Buffer
			flags := blackfriday.LIST_TYPE_DEFINITION
			matches := reDefinitionList.FindSubmatch(data)
			flags |= blackfriday.LIST_TYPE_TERM
			p.inline(&work, matches[1])
			p.r.ListItem(&tmpBlock, work.Bytes(), flags)
			work.Reset()
			flags &= ^blackfriday.LIST_TYPE_TERM
			p.inline(&work, matches[2])
			p.r.ListItem(&tmpBlock, work.Bytes(), flags)
		case isUnorderedList(data):
			if inList != true {
				listType = "ul"
				inList = true
			}
			matches := reUnorderedList.FindSubmatch(data)
			var work bytes.Buffer
			p.inline(&work, matches[2])
			p.r.ListItem(&tmpBlock, work.Bytes(), 0)
		case isOrderedList(data):
			if inList != true {
				listType = "ol"
				inList = true
			}
			matches := reOrderedList.FindSubmatch(data)
			var work bytes.Buffer
			tmpBlock.WriteString("<li")
			if len(matches[2]) > 0 {
				tmpBlock.WriteString(" value=\"")
				tmpBlock.Write(matches[2])
				tmpBlock.WriteString("\"")
				matches[3] = matches[3][1:]
			}
			p.inline(&work, matches[3])
			tmpBlock.WriteString(">")
			tmpBlock.Write(work.Bytes())
			tmpBlock.WriteString("</li>\n")
		case isHorizontalRule(data):
			p.r.HRule(&output)
		case isExampleLine(data):
			if inParagraph == true {
				if len(tmpBlock.Bytes()) > 0 {
					p.generateParagraph(&output, tmpBlock.Bytes()[:len(tmpBlock.Bytes())-1])
					inParagraph = false
				}
				tmpBlock.Reset()
			}
			if inFixedWidthArea != true {
				tmpBlock.WriteString("<pre class=\"example\">\n")
				inFixedWidthArea = true
			}
			matches := reExampleLine.FindSubmatch(data)
			tmpBlock.Write(matches[1])
			tmpBlock.WriteString("\n")
			break
		default:
			if inParagraph == false {
				inParagraph = true
				if inFixedWidthArea == true {
					if tmpBlock.Len() > 0 {
						tmpBlock.WriteString("</pre>")
						output.Write(tmpBlock.Bytes())
					}
					inFixedWidthArea = false
					tmpBlock.Reset()
				}
			}
			tmpBlock.Write(data)
			tmpBlock.WriteByte('\n')
		}
	}

	if len(tmpBlock.Bytes()) > 0 {
		if inParagraph == true {
			p.generateParagraph(&output, tmpBlock.Bytes()[:len(tmpBlock.Bytes())-1])
		} else if inFixedWidthArea == true {
			tmpBlock.WriteString("</pre>\n")
			output.Write(tmpBlock.Bytes())
		}
	}

	// Writing footnote def. list
	if len(p.notes) > 0 {
		flags := blackfriday.LIST_ITEM_BEGINNING_OF_LIST
		p.r.Footnotes(&output, func() bool {
			for i := range p.notes {
				p.r.FootnoteItem(&output, []byte(p.notes[i].id), []byte(p.notes[i].def), flags)
			}
			return true
		})
	}

	return output.Bytes()
}
417689
func (r *Router) Options(pattern string, handlers ...Middleware) *Router {
	return r.Handle(http.MethodOptions, pattern, handlers...)
}
317789
func (c *Endpoint) ClientOpts() ([]client.Opt, error) {
	var result []client.Opt
	if c.Host != "" {
		helper, err := connhelper.GetConnectionHelper(c.Host)
		if err != nil {
			return nil, err
		}
		if helper == nil {
			tlsConfig, err := c.tlsConfig()
			if err != nil {
				return nil, err
			}
			result = append(result,
				client.WithHost(c.Host),
				withHTTPClient(tlsConfig),
			)

		} else {
			httpClient := &http.Client{
				// No tls
				// No proxy
				Transport: &http.Transport{
					DialContext: helper.Dialer,
				},
			}
			result = append(result,
				client.WithHTTPClient(httpClient),
				client.WithHost(helper.Host),
				client.WithDialContext(helper.Dialer),
			)
		}
	}

	version := os.Getenv("DOCKER_API_VERSION")
	if version != "" {
		result = append(result, client.WithVersion(version))
	}
	return result, nil
}
729641
func Options(opts ...grpc.ServerOption) server.Option {
	return func(o *server.Options) {
		if o.Context == nil {
			o.Context = context.Background()
		}
		o.Context = context.WithValue(o.Context, grpcOptions{}, opts)
	}
}
1354982
func Options(url string, v ...interface{}) (*Resp, error) {
	return std.Options(url, v...)
}
1257992
func OPTIONS(relativePath string, handlers ...gin.HandlerFunc) gin.IRoutes {
	return engine().OPTIONS(relativePath, handlers...)
}
682085
func (s *ScalingParametersStatus) SetOptions(v *ScalingParameters) *ScalingParametersStatus {
	s.Options = v
	return s
}
50149
func (g *routeGroup) Options(path string, h http.HandlerFunc) {
	g.handle(http.MethodOptions, path, h)
}
863097
func (s Style) WriteTextOptionsToRenderer(r Renderer) {
	r.SetClassName(s.GetClassName())
	r.SetFont(s.GetFont())
	r.SetFontColor(s.GetFontColor())
	r.SetFontSize(s.GetFontSize())
}
38265
func (r *Router) OPTIONS(path string, handlers ...HandlerFunc) {
	r.Handle("OPTIONS", path, handlers)
}
334
func (s *IndexFieldStatus) SetOptions(v *IndexField) *IndexFieldStatus {
	s.Options = v
	return s
}
778046
func (gr *GoReq) Options(targetURL string) *GoReq {
	//gr.Reset()
	gr.Method = OPTIONS
	gr.URL = targetURL
	gr.Errors = nil
	return gr
}
1225101
func Render(doc []byte) []byte {
	renderer := NewRoffRenderer()

	return blackfriday.Run(doc,
		[]blackfriday.Option{blackfriday.WithRenderer(renderer),
			blackfriday.WithExtensions(renderer.GetExtensions())}...)
}
1078678
func (s *AnalysisSchemeStatus) SetOptions(v *AnalysisScheme) *AnalysisSchemeStatus {
	s.Options = v
	return s
}
195215
func Options(path string, h interface{}, m ...interface{}) {
	Default.Options(path, h, m...)
}
101144
func (r *Router) OPTIONS(path string, handle Handle) {
	r.Router.OPTIONS(path, r.middlewareSelect(handle))
}