Skip to content

Fix image parsing regex bug #97

Description

@codicocodes

it.skip('matches absolute github url with "-" in owner name', () => {
const md = "![fidget.nvim demo](https://github.com/j-hui/fidget.nvim/blob/media/gifs/fidget-demo-rust-analyzer.gif?raw=true)"
const output = "https://github.com/ghraw/j-hui/fidget.nvim/media/gifs/fidget-demo-rust-analyzer.gif"
const media = run(md, "j-hui", "fidget.nvim", "main");
expect(media[0]).toEqual(output);
expect(media.length).toBe(1);
})

Make this test and all other tests pass, the image matching code is trash but at least we're starting to have some test coverage so we can refactor when appropriate

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions