mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-30 03:56:23 -05:00 
			
		
		
		
	changed up the highlight fragment formatter
This commit is contained in:
		
							
								
								
									
										15
									
								
								docs/api.rst
									
									
									
									
									
								
							
							
						
						
									
										15
									
								
								docs/api.rst
									
									
									
									
									
								
							| @@ -221,21 +221,16 @@ Each fragment contains a list of strings, and some of them are marked as a highl | ||||
|  | ||||
|     [ | ||||
|         [ | ||||
|             {"text": "This is a sample text with a "}, | ||||
|             {"text": "highlighted", "term": 0}, | ||||
|             {"text": " word."} | ||||
|             {"text": "This is a sample text with a ", "highlight": false}, | ||||
|             {"text": "highlighted", "highlight": true}, | ||||
|             {"text": " word.", "highlight": false} | ||||
|         ], | ||||
|         [ | ||||
|             {"text": "Another", "term": 1}, | ||||
|             {"text": " fragment with a highlight."} | ||||
|             {"text": "Another", "highlight": true}, | ||||
|             {"text": " fragment with a highlight.", "highlight": false} | ||||
|         ] | ||||
|     ] | ||||
|  | ||||
|  | ||||
|  | ||||
| When ``term`` is present within a string, the word within ``text`` should be highlighted. | ||||
| The term index groups multiple matches together and words with the same index | ||||
| should get identical highlighting. | ||||
| A client may use this example to produce the following output: | ||||
|  | ||||
| ... This is a sample text with a **highlighted** word. ... **Another** fragment with a highlight. ... | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 jonaswinkler
					jonaswinkler