Retrieves the text within the specified range in the given document. Args: doc (str): The document to extract text from. range (dict): The range object specifying the start and end positions. Returns: str: The extracted text within the specified range.
(doc, range)
| 243 | return None |
| 244 | |
| 245 | def get_text(doc, range): |
| 246 | """ |
| 247 | Retrieves the text within the specified range in the given document. |
| 248 | |
| 249 | Args: |
| 250 | doc (str): The document to extract text from. |
| 251 | range (dict): The range object specifying the start and end positions. |
| 252 | |
| 253 | Returns: |
| 254 | str: The extracted text within the specified range. |
| 255 | """ |
| 256 | return doc[offset_at_position(doc, range["start"]):offset_at_position(doc, range["end"])] |
| 257 | |
| 258 | def offset_at_position(doc, position): |
| 259 | """ |
no test coverage detected