mirror of
				https://github.com/superseriousbusiness/gotosocial.git
				synced 2025-11-03 22:12:26 -06:00 
			
		
		
		
	[chore]: Bump github.com/yuin/goldmark from 1.7.6 to 1.7.8 (#3470)
Bumps [github.com/yuin/goldmark](https://github.com/yuin/goldmark) from 1.7.6 to 1.7.8. - [Release notes](https://github.com/yuin/goldmark/releases) - [Commits](https://github.com/yuin/goldmark/compare/v1.7.6...v1.7.8) --- updated-dependencies: - dependency-name: github.com/yuin/goldmark dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
		
					parent
					
						
							
								fab7d17031
							
						
					
				
			
			
				commit
				
					
						ea1bf5f8a3
					
				
			
		
					 11 changed files with 116 additions and 38 deletions
				
			
		
							
								
								
									
										26
									
								
								vendor/github.com/yuin/goldmark/text/segment.go
									
										
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										26
									
								
								vendor/github.com/yuin/goldmark/text/segment.go
									
										
									
										generated
									
									
										vendored
									
									
								
							| 
						 | 
				
			
			@ -20,8 +20,19 @@ type Segment struct {
 | 
			
		|||
	// Padding is a padding length of the segment.
 | 
			
		||||
	Padding int
 | 
			
		||||
 | 
			
		||||
	// EOB is true if the segment is end of the block.
 | 
			
		||||
	EOB bool
 | 
			
		||||
	// ForceNewline is true if the segment should be ended with a newline.
 | 
			
		||||
	// Some elements(i.e. CodeBlock, FencedCodeBlock) does not trim trailing
 | 
			
		||||
	// newlines. Spec defines that EOF is treated as a newline, so we need to
 | 
			
		||||
	// add a newline to the end of the segment if it is not empty.
 | 
			
		||||
	//
 | 
			
		||||
	// i.e.:
 | 
			
		||||
	//
 | 
			
		||||
	//     ```go
 | 
			
		||||
	//     const test = "test"
 | 
			
		||||
	//
 | 
			
		||||
	// This code does not close the code block and ends with EOF. In this case,
 | 
			
		||||
	// we need to add a newline to the end of the last line like `const test = "test"\n`.
 | 
			
		||||
	ForceNewline bool
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// NewSegment return a new Segment.
 | 
			
		||||
| 
						 | 
				
			
			@ -52,7 +63,7 @@ func (t *Segment) Value(buffer []byte) []byte {
 | 
			
		|||
		result = append(result, bytes.Repeat(space, t.Padding)...)
 | 
			
		||||
		result = append(result, buffer[t.Start:t.Stop]...)
 | 
			
		||||
	}
 | 
			
		||||
	if t.EOB && len(result) > 0 && result[len(result)-1] != '\n' {
 | 
			
		||||
	if t.ForceNewline && len(result) > 0 && result[len(result)-1] != '\n' {
 | 
			
		||||
		result = append(result, '\n')
 | 
			
		||||
	}
 | 
			
		||||
	return result
 | 
			
		||||
| 
						 | 
				
			
			@ -217,3 +228,12 @@ func (s *Segments) Unshift(v Segment) {
 | 
			
		|||
	s.values = append(s.values[0:1], s.values[0:]...)
 | 
			
		||||
	s.values[0] = v
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Value returns a string value of the collection.
 | 
			
		||||
func (s *Segments) Value(buffer []byte) []byte {
 | 
			
		||||
	var result []byte
 | 
			
		||||
	for _, v := range s.values {
 | 
			
		||||
		result = append(result, v.Value(buffer)...)
 | 
			
		||||
	}
 | 
			
		||||
	return result
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue