{"thread":{"id":"52882","subject":"[almost-patch] Add diff regular expressions for Markdown and Zshell","startedAt":"2020-02-25T13:56:43Z","lastAt":"2020-02-25T13:56:43Z","messageCount":1,"participants":["Sebastian Gniazdowski"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"392471","messageId":"CAKc7PVAWwJSAMbqyn-EOiTn7nc_dXHrqD68JtwdrK8-WN2mkUA@mail.gmail.com","threadId":"52882","inReplyTo":null,"subject":"[almost-patch] Add diff regular expressions for Markdown and Zshell","fromName":"Sebastian Gniazdowski","fromEmail":"sgniazdowski@gmail.com","sentAt":"2020-02-25T13:56:49Z","receivedAt":"2020-02-25T13:56:43Z","isPatch":true,"sender":{"key":"sgniazdowski@gmail.com","avatar":"https://gravatar.com/avatar/4fe8402ad2382744749d089f9c26c9a9fd58c4265afcc0a945d2869cad528e39?d=mp&s=160"},"body":"Hi.\nGit comes with a few of the diff-regexes built-in. They are listed\nhere: https://git-scm.com/docs/gitattributes#_defining_a_custom_hunk_header\n\nI'm a Zsh plugin creator and I've found the following regexes to be useful:\n\n- Zshell function-matching:\n    xfuncname =\n\"^((function[[:blank:]]+[^[:blank:]]+[[:blank:]]*(\\\\(\\\\)|))|([^[:blank:]]+[[:blank:]]*\\\\(\\\\)))[[:blank:]]*(\\\\{|)[[:blank:]]*$\"\n\n- Markdown hading-matching:\n    xfuncname = \"^#+[[:blank:]].*$\"\n\nCould those regexes be added to the built-in set? I think that they're\nextremely useful and shipping them with Git would lift the requirement\nof having them in each .gitconfig on each machine – particularly\nuseful for e.g.: receiving bug-reports from Zsh-plugin users, that may\nhave the patterns not set up.\n\n-- \nSebastian Gniazdowski\nNews: https://twitter.com/ZdharmaI\nIRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zinit\nBlog: http://zdharma.org\n"}]}