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

Bug: Failing to load github links? #243

Open
holroy opened this issue Mar 22, 2024 · 4 comments
Open

Bug: Failing to load github links? #243

holroy opened this issue Mar 22, 2024 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@holroy
Copy link

holroy commented Mar 22, 2024

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:

image

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

@holroy holroy added the bug Something isn't working label Mar 22, 2024
@mayurankv
Copy link
Owner

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?

@mayurankv
Copy link
Owner

Sorry just wanted to check in and see whether that fixed your issue?

@holroy
Copy link
Author

holroy commented May 6, 2024

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:

image


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?

@mayurankv
Copy link
Owner

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants