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

fix: get image path from HTML <img src=""> tag #493

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

ooker777
Copy link
Contributor

Copy link

pkg-pr-new bot commented Jul 11, 2024

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

commit: bde37e1

reveal-md

npm i https://pkg.pr.new/webpro/reveal-md@493


templates

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)
Copy link
Owner

@webpro webpro left a 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]
Copy link
Owner

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.

Copy link
Contributor Author

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)
Copy link
Owner

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

Copy link
Contributor Author

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();
Copy link
Owner

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?

@ooker777
Copy link
Contributor Author

@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?

@MartenBE
Copy link
Contributor

It's probably best to create a PR for each for history (in case a bug has to be tracked down)

@MartenBE MartenBE mentioned this pull request Aug 26, 2024
@webpro
Copy link
Owner

webpro commented Aug 30, 2024

Do you still need me to do that, or can you just review all of them at one?

Yes, please create separate PRs for separate fixes/features.

@webpro webpro force-pushed the main branch 2 times, most recently from eb6481b to a2f61db Compare August 31, 2024 14:18
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.

3 participants