Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How would I URL encode my highlights' text? #103

Closed
Ninjani opened this issue Dec 31, 2023 Discussed in #100 · 0 comments · Fixed by #102
Closed

How would I URL encode my highlights' text? #103

Ninjani opened this issue Dec 31, 2023 Discussed in #100 · 0 comments · Fixed by #102

Comments

@Ninjani
Copy link
Member

Ninjani commented Dec 31, 2023

Discussed in #100

Originally posted by daraul September 22, 2023
I transfer my annotations into org-mode with the template below. How would I go about URL encoding this in the ROAM_REFS property? Think of javascript's encodeURIComponent.

annotation_template = '''
{{#each highlight}}** {{this}} {{#each ../tags}}:{{this}}{{#if @last}}:{{/if}}{{/each}}
:PROPERTIES:
:ANNOTATION_ID: {{../id}}
:ROAM_REFS:     [[{{../uri}}#:~:text={{this}}]]
:CREATED:       {{date_format "%c" ../created}}
:END:

{{../text}}
{{/each}}
'''
```</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant