mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-29 10:57:44 +09:00 
			
		
		
		
	Signed-off-by: PJ Eby <pje@telecommunity.com>
This commit is contained in:
		
							
								
								
									
										8
									
								
								vendor/github.com/russross/blackfriday/inline.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										8
									
								
								vendor/github.com/russross/blackfriday/inline.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -170,6 +170,10 @@ func lineBreak(p *parser, out *bytes.Buffer, data []byte, offset int) int { | ||||
| 	precededByBackslash := offset >= 1 && data[offset-1] == '\\' // see http://spec.commonmark.org/0.18/#example-527 | ||||
| 	precededByBackslash = precededByBackslash && p.flags&EXTENSION_BACKSLASH_LINE_BREAK != 0 | ||||
|  | ||||
| 	if p.flags&EXTENSION_JOIN_LINES != 0 { | ||||
| 		return 1 | ||||
| 	} | ||||
|  | ||||
| 	// should there be a hard line break here? | ||||
| 	if p.flags&EXTENSION_HARD_LINE_BREAK == 0 && !precededByTwoSpaces && !precededByBackslash { | ||||
| 		return 0 | ||||
| @@ -484,6 +488,7 @@ func link(p *parser, out *bytes.Buffer, data []byte, offset int) int { | ||||
| 			} | ||||
|  | ||||
| 			p.notes = append(p.notes, ref) | ||||
| 			p.notesRecord[string(ref.link)] = struct{}{} | ||||
|  | ||||
| 			link = ref.link | ||||
| 			title = ref.title | ||||
| @@ -494,9 +499,10 @@ func link(p *parser, out *bytes.Buffer, data []byte, offset int) int { | ||||
| 				return 0 | ||||
| 			} | ||||
|  | ||||
| 			if t == linkDeferredFootnote { | ||||
| 			if t == linkDeferredFootnote && !p.isFootnote(lr) { | ||||
| 				lr.noteId = len(p.notes) + 1 | ||||
| 				p.notes = append(p.notes, lr) | ||||
| 				p.notesRecord[string(lr.link)] = struct{}{} | ||||
| 			} | ||||
|  | ||||
| 			// keep link and title from reference | ||||
|   | ||||
		Reference in New Issue
	
	Block a user