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

Modified image extraction to allow for size and CSS modifiers #169

Merged
merged 4 commits into from
May 4, 2024

Conversation

oricc
Copy link
Contributor

@oricc oricc commented Apr 28, 2024

Image embeds in obsidian can be modified using a pipe syntax.

See:

Currently, the regex extracts all the pipes as part of the file name, which means any image modified by pipes can't be displayed in the timeline. This minor change takes the image name only before the pipe symbol to allow this.

An example:
![[image.png|200X200]] does not appear in the timeline in the current version but does after the change

Image embeds in obsidian can be modified using a pipe syntax.

See:
- https://forum.obsidian.md/t/resize-embedded-content/877/23
- https://www.reddit.com/r/ObsidianMD/comments/v1fs0f/centering_images_in_reading_mode/

Currently, the regex extracts all the pipes as part of the file name, which means any image modified by pipes can't be  displayed in the timeline.
This minor change takes the image name only before the pipe symbol to allow this.
@April-Gras
Copy link
Owner

image

Hey @oricc, thank you so much for this 🙏
A great contribution, just one thing to fix
You can run npx eslint . --config .eslintrc --ext .js,.jsx,.ts,.tsx to reproduce on your end

@oricc oricc marked this pull request as draft April 29, 2024 21:39
@oricc oricc marked this pull request as ready for review April 29, 2024 21:54
@oricc
Copy link
Contributor Author

oricc commented Apr 29, 2024

Hey @April-Gras, thanks for the quick feedback.
I fixed the issue and verified it still works

@April-Gras
Copy link
Owner

Perfect! Now all that is left to do is to bump the version in the package.json by one patch so
0.13.2 -> 0.13.3

Run npm run version and commit the changes done to the files
Very exited to see this released ✨

@oricc
Copy link
Contributor Author

oricc commented May 2, 2024

Done 😊

@April-Gras April-Gras merged commit 6e76364 into April-Gras:master May 4, 2024
2 checks passed
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.

None yet

2 participants