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.
That shouldn't be "any" especially since you have defined a type for the references.
|
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 textThe 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