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

Allow placing custom readers and writers in data subdir #8112

Merged
merged 3 commits into from Jun 10, 2022

Conversation

tarleb
Copy link
Collaborator

@tarleb tarleb commented Jun 6, 2022

No description provided.

@tarleb tarleb marked this pull request as ready for review June 7, 2022 20:46
@@ -668,6 +669,29 @@ withPaths (p:ps) action fp =
catchError ((p </> fp,) <$> action (p </> fp))
(\_ -> withPaths ps action fp)

-- | If @fp@ doesn't exist, but the data file relative to @/subdir/@
-- does, then return that; otherwise return @fp@.
findFile :: PandocMonad m
Copy link
Owner

Choose a reason for hiding this comment

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

Sorry to revise my original suggestion, but what about findFileWithDataFallback?
findFile should be reserved for something less special-purpose.

Copy link
Owner

Choose a reason for hiding this comment

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

Also, could we use this function to simplify readMetadataFile?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Both done

@jgm
Copy link
Owner

jgm commented Jun 10, 2022

This looks good to go.

@jgm jgm merged commit 42cbc71 into jgm:master Jun 10, 2022
jgm added a commit that referenced this pull request Jun 10, 2022
be sought in the readers/writers subdirectory of
the user data directory if not found relative to
the working directory.

Documents #8112.
@tarleb tarleb deleted the reader-writer-datadir branch June 10, 2022 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants