Obsidian-Code-Styler
Obsidian-Code-Styler copied to clipboard
Bug: Failing to load github links?
Describe the bug
It might be it's just me failing to understand the syntax, but I can't get the github links to perform nicely, and show me any output. Neither with your supplied link or a link of my own.
Steps to reproduce
Copy the block below, and switch to reading mode
## Your link
``` link: https://github.com/mayurankv/Obsidian-Code-Styler/blob/main/README.md
```
## My diff link
```js link= https://github.com/blacksmithgu/obsidian-dataview/compare/master...holroy:obsidian-dataview:master#diff-fa19c379a3470fd232ad9d487273be98ac6dfa5ad3cd629fa9b2431f5dcadcb9
```
Expected behaviour
I wanted to preserve a diff of my fork of dataview and the main dataview repository, and when that failed I tried your example just to verify that it actually worked at all. I expected seeing some code of either variant.
Current behaviour
No code output. The only thing I got was this:
Environment
- Plugin Version: 1.1.7
- Obsidian Version: 1.5.11
- Platform: Desktop
- OS: Win11
- Theme: Github Theme
- CSS Snippets: Yeah... :-D
- Dataview version: 0.5.65
Additional context
This might be just me failing to understand your syntax, in case I might need to become smarter, or your documentation a little bit better! :-P
Hi sorry for the slow reply! Just so you're aware, the syntax is:
```reference
link: https://github.com/mayurankv/Obsidian-Code-Styler/blob/main/README.md
```
Does this still not work?
Sorry just wanted to check in and see whether that fixed your issue?
Sorry that it took me so long to get back to you, I've been busy with other stuff, and had almost forgot about this issue.
The "normal" file link works, but the diff link doesn't work:
```reference
link: https://github.com/blacksmithgu/obsidian-dataview/compare/master...holroy:obsidian-dataview:master#diff-fa19c379a3470fd232ad9d487273be98ac6dfa5ad3cd629fa9b2431f5dcadcb9
```
Not sure if that's supposed to work or not... But that link what was I wanted to display locally. The code above outputs:
And the following link produces the entire file, but I think this is me having the wrong line references again. The link was lifted directly from Github though:
```reference
link: https://github.com/blacksmithgu/obsidian-dataview/blob/0c54ac0b3cc83e72ad40913b3229ff02923243d6/src/api/plugin-api.ts#L211
```
Is it possible to only lift a few of the lines, and potentially highlight a given line?
Is the syntax for a reference code block described somewhere? Am I just bad at reading?
Also apologies for such a late reply! My masters got quite busy but hopefully I'll have some time now to get back on top of this plugin. The syntax is described (relatively poorly) here. I'll hopefully update that to make it a bit clearer. Each parameter goes on a new line.
I'll also go and take a look at the issue with the comparison diff!