Skip to content

Conversation

ghost
Copy link

@ghost ghost commented Jun 10, 2018

This PR adds a negative lookbehind for multiline codeblocks, to fix an issue where a module name in an inline codeblock after a multiline codeblock didn't get correctly matched, due to the regex matching from the multiline codeblock to the inline codeblock.

Before: https://regex101.com/r/Du8vUp/1
After: https://regex101.com/r/Zit4pj/1

@sourcelevel-bot
Copy link

Hello, @CharlotteDunois! This is your first Pull Request that will be reviewed by Ebert, an automatic Code Review service. It will leave comments on this diff with potential issues and style violations found in the code as you push new commits. You can also see all the issues found on this Pull Request on its review page. Please check our documentation for more information.

@josevalim
Copy link
Member

Thank you @CharlotteDunois! Could you please also add unit test to autolink_test.exs so we don't have any regressions in the future?

@ghost
Copy link
Author

ghost commented Jun 10, 2018

@josevalim Thanks for the heads up! The unit test is added.

@josevalim josevalim merged commit 2159764 into elixir-lang:master Jun 10, 2018
@josevalim
Copy link
Member

❤️ 💚 💙 💛 💜

@ghost ghost deleted the fix-regex branch June 10, 2018 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants