Skip to content

Commit

Permalink
fixed 'Line breaks in highlights cause link to fail' (#268)
Browse files Browse the repository at this point in the history
  • Loading branch information
HardwayLinka committed Jan 5, 2023
1 parent df3b71a commit 3202817
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/defineGenericAnnotation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,8 @@ export default (vault: Vault, plugin: AnnotatorPlugin) => {
);
if (matchingAnnotations.length > 0) {
const annotation = matchingAnnotations[0];
const { exact } = getAnnotationHighlightTextData(annotation);
let { exact } = getAnnotationHighlightTextData(annotation);
exact = exact.replace(/[\r\n]/g, ' ');
plugin.dragData = {
annotationFilePath: props.annotationFile,
annotationId: annotation.id,
Expand Down

0 comments on commit 3202817

Please sign in to comment.