-
Notifications
You must be signed in to change notification settings - Fork 417
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
fix: get image path from HTML <img src=""> tag #493
base: main
Are you sure you want to change the base?
Conversation
ooker777
commented
Jul 11, 2024
- fix: preprocessor argument doesn't work with Windows paths Preprocessor argument doesn't work with Windows paths #490
- fix: get image path from HTML tag
Run & review this pull request in StackBlitz Codeflow. commit: reveal-md
|
Using variable `markdown` to filter image paths will miss paths generated from preprocessor. Use `markup` instead. Markdown format requires URL to use `%20`, not space. But the path must retains spaces in order to be copied correctly. `decodeURIComponent` is used for this.
… will be changed on GitHub Page See this question: [Linking to a page with a dash (hyphen) in the title In GitHub wiki](https://stackoverflow.com/q/77244370/3416774)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tried to review, but there's a lot going on. Please keep it small and focused to PR description.
@@ -11,7 +11,7 @@ Options: | |||
--highlight-theme <theme> Highlight theme [default: zenburn] | |||
--css <files> CSS files to inject into the page | |||
--scripts <files> Scripts to inject into the page | |||
--assets-dir <dirname> Defines assets directory name [default: _assets] | |||
--assets-dir <dirname> Defines assets directory name [default: assets] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this change? Might be a breaking change to some and it's a bit much for one PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GitHub seems to change the folder name if there is a dash at the start of the name. See Linking to a page with a dash (hyphen) in the title In GitHub wiki
@@ -34,7 +34,8 @@ export default async (initialUrl, targetDir) => { | |||
const snapshotFilename = `${targetDir}/featured-slide.jpg`; | |||
|
|||
const url = `http://${host}:${port}/${initialUrl}${getSlideAnchor(featuredSlide.toString())}`; | |||
|
|||
|
|||
console.log("🚀 ~ url:", url) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this isn't supposed to be part of this PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, I should clean this before pushing
@@ -27,7 +27,7 @@ const getFileMeta = async filePath => { | |||
// Exports --------------------------------------------------------------------- | |||
|
|||
export const renderListFile = async filePaths => { | |||
const { title, listingTemplate, theme, assetsDir } = getOptions(); | |||
const { title, description, listingTemplate, theme, assetsDir } = getOptions(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where's description
coming from? Not sure what it has to do with intention of PR?
@webpro sorry for the confusion. The correct commit for this PR is only 571889f. Subsequent commits should be for different PRs. Each of them is for a different feature. I didn't know that when I did the push. Now it's my understanding that I have to create different branches if I want to open different PRs. Do you still need me to do that, or can you just review all of them at one? |
It's probably best to create a PR for each for history (in case a bug has to be tracked down) |
Yes, please create separate PRs for separate fixes/features. |
eb6481b
to
a2f61db
Compare