-
Notifications
You must be signed in to change notification settings - Fork 7
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
Customize the rendering of inline references #27
base: main
Are you sure you want to change the base?
Conversation
…a separate function
When the user types a word that starts with "@", the content script reads this as a potential cite key and tries to get the actual reference directly. Of course, the word does not have to be a valid cite key, which causes the data store to throw "Reference not Found" Exception
…erence" token extract-references.ts is reused to create inline reference tokens, to be later on parsed by the renderer
Now it works on two patterns:
|
case GET_REFERENCE_BY_ID: | ||
console.log(req); | ||
const id = req["id"]; | ||
let ans: any; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That shouldn't be "any" especially since you have defined a type for the references.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see
Did you manage to solve your issues? If not, please let me know and describe in details what the issue is. |
What has been done so far
Issues encounteredI want to execute some javascript code during the rendering of every reference. For some reason, just writing a <span class="hello">Hello Worl</span>
<style> .hello { font-weight: bold } </style>
This is just a sample text The rendered content looks like this: What's left to doImplement the remaining patterns described here |
This PR is not complete yet
What's done
Render all inline references that match the pattern
[-@citekey]
like(year)
What's left
Include all the other patterns described here