403Webshell
Server IP : 217.160.0.212  /  Your IP : 216.73.216.141
Web Server : Apache
System : Linux www 6.18.51-i1-ampere #1196 SMP Fri Sep 11 20:43:55 CEST 2026 aarch64
User : sws1073854427 ( 1073854427)
PHP Version : 8.4.23
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /usr/lib/go/src/cmd/vendor/rsc.io/markdown/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/go/src/cmd/vendor/rsc.io/markdown/quote.go
// Copyright 2021 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package markdown

import (
	"bytes"
)

type Quote struct {
	Position
	Blocks []Block
}

func (b *Quote) PrintHTML(buf *bytes.Buffer) {
	buf.WriteString("<blockquote>\n")
	for _, c := range b.Blocks {
		c.PrintHTML(buf)
	}
	buf.WriteString("</blockquote>\n")
}

func (b *Quote) printMarkdown(buf *bytes.Buffer, s mdState) {
	s.prefix += "> "
	printMarkdownBlocks(b.Blocks, buf, s)
}

func trimQuote(s line) (line, bool) {
	t := s
	t.trimSpace(0, 3, false)
	if !t.trim('>') {
		return s, false
	}
	t.trimSpace(0, 1, true)
	return t, true
}

type quoteBuilder struct{}

func newQuote(p *parseState, s line) (line, bool) {
	if line, ok := trimQuote(s); ok {
		p.addBlock(new(quoteBuilder))
		return line, true
	}
	return s, false
}

func (b *quoteBuilder) extend(p *parseState, s line) (line, bool) {
	return trimQuote(s)
}

func (b *quoteBuilder) build(p buildState) Block {
	return &Quote{p.pos(), p.blocks()}
}

Youez - 2016 - github.com/yon3zu
LinuXploit