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

Import assets from markdown file #316

Merged

Conversation

Mukund-Tandon
Copy link
Contributor

This PR adds support to detect images from markdown file which are in ![Alt text](path to image) format
It also fixes the error where if a file is there in markdown file it is detected as a url since both have a similar representation in markdown - [Alt tex](url or file path) not if it is a file it is treated as a simple paragraph with text "This is currently not supported : [Alt text](file path)"
Related to AppFlowy-IO/AppFlowy#2981

@codecov
Copy link

codecov bot commented Jul 14, 2023

Codecov Report

Merging #316 (800ebba) into main (87fd7ed) will increase coverage by 3.16%.
The diff coverage is 93.33%.

@@            Coverage Diff             @@
##             main     #316      +/-   ##
==========================================
+ Coverage   72.24%   75.40%   +3.16%     
==========================================
  Files         237      238       +1     
  Lines        9539     9649     +110     
==========================================
+ Hits         6891     7276     +385     
+ Misses       2648     2373     -275     
Impacted Files Coverage Δ
...ns/markdown/decoder/document_markdown_decoder.dart 94.68% <93.33%> (-0.26%) ⬇️

... and 54 files with indirect coverage changes

@Mukund-Tandon
Copy link
Contributor Author

@LucasXu0 ,please can you review this PR

@LucasXu0
Copy link
Collaborator

LucasXu0 commented Jul 19, 2023

@LucasXu0 ,please can you review this PR

@Mukund-Tandon I did some changes.

  • use regex to match the image path and file path.
  • remove the hint text(... not supported...).
  • define the regexes as class properties.

@Mukund-Tandon
Copy link
Contributor Author

@LucasXu0 ,please can you review this PR

@Mukund-Tandon I did some changes.

  • use regex to match the image path and file path.
  • remove the hint text(... not supported...).
  • define the regexes as class properties.

Ok 👍

@Mukund-Tandon
Copy link
Contributor Author

@LucasXu0 , Is there anything else I need to do?

@LucasXu0
Copy link
Collaborator

@LucasXu0 , Is there anything else I need to do?

No, you can integrate the latest version into AppFlowy and continue developing the markdown import feature.

@LucasXu0 LucasXu0 merged commit 8a76e36 into AppFlowy-IO:main Jul 19, 2023
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