Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@KSR-Yasuda
Copy link
Contributor

Support local link along with local image reference.

Now it only supports local image (e.g. ![ALT_TEXT](local/image/path.png)).

Along with this, make it support local link (e.g. [LINK_TEXT](local/file/path.txt), the syntax not !-preceding).

Also, handle local link label (e.g. [LABEL]: local/file/path.txt).
This syntax is used for both of link ([LINK_TEXT][LABEL]) and image (![ALT_TEXT][LABEL]).

Constraints:
Of course, local link for markdown is opened as raw text without rich-styling.

@KSR-Yasuda
Copy link
Contributor Author

Oh, case get_alt_and_path_from_image_in_link ([![IMG](path/img.png)](path/some/file)) does not work correctly.

This is tough, gee..

@KSR-Yasuda KSR-Yasuda marked this pull request as draft January 31, 2024 06:08
@KSR-Yasuda KSR-Yasuda marked this pull request as ready for review January 31, 2024 07:10
@KSR-Yasuda KSR-Yasuda marked this pull request as draft January 31, 2024 07:23
@KSR-Yasuda KSR-Yasuda marked this pull request as ready for review January 31, 2024 07:40
@KSR-Yasuda
Copy link
Contributor Author

Test case

[![IMG](path/img.png)](path/some/file)

[![IMG](path/img.png)](path/some/file "title") title

[![IMG](path/img.png)](path/some/file  "title") title2

[link](path/some/file)

[link](path/some/file "title") title

[link](path/some/file  "title") title2

![ALT_TEXT](local/image/path.png)

![ALT_TEXT](local/image/path.png "title") title

![ALT_TEXT](local/image/path.png  "title") title2

[LINK_TEXT](local/file/path.txt)

[LINK_TEXT](local/file/path.txt "title") title

[LINK_TEXT](local/file/path.txt  "title") title2

[LABEL]: local/file/path.txt

[LABEL_TITLE]: local/file/path.txt "title"

[LABEL_TITLE2]: local/file/path.txt  "title"

[LINK_TEXT][LABEL]

![ALT_TEXT][LABEL]

[LINK_TEXT][LABEL_TITLE] title

![ALT_TEXT][LABEL_TITLE] title

[LINK_TEXT][LABEL_TITLE2] title2

![ALT_TEXT][LABEL_TITLE2] title2

Copy link
Member

@lambdalisue lambdalisue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for late. LGTM

@lambdalisue lambdalisue merged commit 7e88ec8 into previm:master May 2, 2024
@KSR-Yasuda KSR-Yasuda deleted the feature/LocalLink branch May 7, 2024 00:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants