sawhney17 / logseq-automatic-linker

MIT License
97 stars 18 forks source link

Automatic Linker does not parse blocks (Logseq 0.8.9) #43

Open dv0zn3r opened 2 years ago

dv0zn3r commented 2 years ago

2022-11-01 11 49 28

For some reason I cannot make the Automatic Linker to work. On/off shortcuts work ok, anything else just does not render any results.

Logseq: 0.8.9 Automatic Linker: v. 1.4.0 OS: Mac OS Ventura, M2

sawhney17 commented 1 year ago

Hmm, can you check the console for errors?

TomTom101 commented 1 year ago

Same here. In the console There's two log entries:

{LogseqAutomaticLinker: 'fetchAliases', result: Array(38), resultMap: Array(38)} {LogseqAutomaticLinker: 'getPages', results: Array(423), pageList: Array(409)} No errors or anything else

Links are parsed when hitting enter, though!

Logseq: 0.8.16 Automatic Linker: 1.4.0 Dev theme: v1.26.15 (this used to break graphs, might be an indicator)

falense commented 1 year ago

I can confirm that this is an issue. I am unable to manually trigger linking either by right clicking block or by keyboard shortcut.

Enter produces these console entries:

image

Keyboard shortcut produces only these two entries:

image

It seems like parseBlockForLink is not called:

{
    "LogseqAutomaticLinker": "parseBlockForLink",
    "block": {
        "properties": {},
        "parent": {
            "id": 1758
        },
        "children": [],
        "id": 1775,
        "pathRefs": [
            {
                "id": 1027
            }
        ],
        "uuid": "6532209c-1a98-426f-8101-ed27a36828f8",
        "content": "Hello world",
        "journal?": false,
        "page": {
            "id": 1027
        },
        "left": {
            "id": 1772
        },
        "format": "markdown"
    }
}

Logseq: 0.9.15 Automatic Linker: 1.5.0 Theme: Default

falense commented 1 year ago

This seems to be by design https://github.com/sawhney17/logseq-automatic-linker/blob/4847b7649ac1429bcaab7261dc8f26906dde3fc1/index.ts#L189

This line disables the ability to manually link if auto linking is enabled. I wonder why.

falense commented 1 year ago

Here is a pull request to fix the above issue: #69

falense commented 1 year ago

@TomTom101 @dv0zn3r You can use my fork in the meanwhile if you want to. You can find it here: https://github.com/falense/logseq-automatic-linker/tree/main Follow the developer instructions in the readme to install it.

sawhney17 commented 1 year ago

Thank you for this fix! I’ve pushed an update! On 20 Oct 2023 at 11:03 AM +0400, Falense @.***>, wrote:

@TomTom101 @dv0zn3r You can use my fork in the meanwhile if you want to. You can find it here: https://github.com/falense/logseq-automatic-linker/tree/main Follow the developer instructions in the readme to install it. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>