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

Strips whitespace to be more compatible with pandoc output #1502

Merged
merged 3 commits into from
Feb 22, 2023

Conversation

benjaminselfridge
Copy link
Contributor

Addresses #1501

Copy link
Contributor

@RyanGlScott RyanGlScott left a comment

Choose a reason for hiding this comment

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

Thanks for the patch! One minor implementation-related question inline.

@@ -105,7 +105,7 @@ markdown = blanks []

isOpenFence l
| "```" `Text.isPrefixOf` l' =
Just $ case Text.drop 3 l' of
Just $ case Text.strip (Text.drop 3 l') of
Copy link
Contributor

Choose a reason for hiding this comment

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

Would it suffice to just use Text.dropWhile isSpace here instead of Text.strip? The latter strips off whitespace from the end of the line, but I don't think that is necessary here, given that the code is already checking is cryptol is a prefix. As a result, it shouldn't matter if there is trailing whitespace at the end. (Please correct me if I've overlooked something, of course.)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nope, that's right :) I'll make that tweak and push...

@RyanGlScott
Copy link
Contributor

RyanGlScott commented Feb 21, 2023

One more thing: would you be able to add a test case that exercises this new feature? (If not, I can push a test case myself when I have a chance.)

@benjaminselfridge
Copy link
Contributor Author

Sure, let me take a look

@benjaminselfridge benjaminselfridge merged commit fd05e16 into master Feb 22, 2023
RyanGlScott added a commit that referenced this pull request Jun 22, 2023
RyanGlScott added a commit that referenced this pull request Jun 22, 2023
RyanGlScott added a commit that referenced this pull request Jun 23, 2023
@RyanGlScott RyanGlScott deleted the feature/unlit-spaces branch March 22, 2024 14:50
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