<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">I’ve taken another failed run at this.<div class=""><br class=""></div><div class="">My patterns are now:</div><div class=""><br class=""></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class=""><div class="">{<span class="Apple-tab-span" style="white-space:pre">       </span>patterns = (</div></div><div class=""><div class=""><span class="Apple-tab-span" style="white-space:pre">            </span>{<span class="Apple-tab-span" style="white-space:pre">   </span>name = 'source.yaml.front-matter';</div></div><div class=""><div class=""><span class="Apple-tab-span" style="white-space:pre">                      </span>begin = '\A-{3}';</div></div><div class=""><div class=""><span class="Apple-tab-span" style="white-space:pre">                       </span>end = '-{3}';</div></div><div class=""><div class=""><span class="Apple-tab-span" style="white-space:pre">                   </span>patterns = ( { include = 'source.yaml'; } );</div></div><div class=""><div class=""><span class="Apple-tab-span" style="white-space:pre">            </span>},</div></div><div class=""><div class=""><span class="Apple-tab-span" style="white-space:pre">              </span>{<span class="Apple-tab-span" style="white-space:pre">   </span>name = 'text.html.markdown.classes';</div></div><div class=""><div class=""><span class="Apple-tab-span" style="white-space:pre">                    </span>begin = '{';</div></div><div class=""><div class=""><span class="Apple-tab-span" style="white-space:pre">                    </span>end = '}';</div></div><div class=""><div class=""><span class="Apple-tab-span" style="white-space:pre">              </span>},</div></div><div class=""><div class=""><span class="Apple-tab-span" style="white-space:pre">              </span>{<span class="Apple-tab-span" style="white-space:pre">   </span>name = 'markup.raw.inline.markdown';</div></div><div class=""><div class=""><span class="Apple-tab-span" style="white-space:pre">                    </span>begin = ' `';</div></div><div class=""><div class=""><span class="Apple-tab-span" style="white-space:pre">                   </span>end = '`(?=[ .,;-=+])';</div></div><div class=""><div class=""><span class="Apple-tab-span" style="white-space:pre">         </span>},</div></div><div class=""><div class=""><span class="Apple-tab-span" style="white-space:pre">              </span>{<span class="Apple-tab-span" style="white-space:pre">   </span>name = 'markup.raw.block.markdown';</div></div><div class=""><div class=""><span class="Apple-tab-span" style="white-space:pre">                     </span>begin = '^`{3}';</div></div><div class=""><div class=""><span class="Apple-tab-span" style="white-space:pre">                        </span>while = '^[^`{3}]';</div></div><div class=""><div class=""><span class="Apple-tab-span" style="white-space:pre">             </span>},</div></div><div class=""><div class=""><span class="Apple-tab-span" style="white-space:pre">      </span>);</div></div><div class=""><div class="">}</div></div></blockquote><div class=""><div class=""><br class=""></div><div class="">And I’m still trying in the same Markdown to match the code block between the ```s.</div><div class=""><br class=""></div><div class=""><blockquote class="" style="font-family: LucidaGrande; margin: 0px 0px 0px 40px; border: none; padding: 0px;"><div class=""><div class="">There are a wide variety of Vagrant Boxes available on [Vagrant Cloud](<a href="https://vagrantcloud.com/boxes/search" class="">https://vagrantcloud.com/boxes/search</a>); you can search there for whatever features you need in a Vagrant Box. I found that [Scotch Box](<a href="https://github.com/scotch-io/scotch-box" class="">https://github.com/scotch-io/scotch-box</a>) works great for me because it is pre-provisioned (all the pieces are already downloaded as part of the box) and includes a full LAMP (Linux, Apache, MySQL, PHP) stack. We don't need the MySQL part for Grav, but it's there. The [Scotch Box Documention](<a href="https://box.scotch.io" class="">https://box.scotch.io</a>) provides plenty of information to get it running (just scroll their web page down).</div></div><div class=""><div class=""><br class=""></div></div><div class=""><div class="">After getting all that done, my project folder for Grav is shown on the right. My Vagrantfile is:</div></div><div class=""><div class="">```</div></div><div class=""><div class="">Vagrant.configure("2") do |config|</div></div><div class=""><div class=""><br class=""></div></div><div class=""><div class="">  config.vm.box = "scotch/box"</div></div><div class=""><div class="">  config.vm.network "private_network", ip: "192.168.33.10"</div></div><div class=""><div class="">  config.vm.hostname = "scotchbox"</div></div><div class=""><div class="">  config.vm.synced_folder ".", "/var/www", :mount_options => ["dmode=777", "fmode=666"]</div></div><div class=""><div class=""><br class=""></div></div><div class=""><div class="">end</div></div><div class=""><div class="">```</div></div><div class=""><div class=""><br class=""></div></div><div class=""><div class="">When I'm ready to work, I open iTerm2 to `grav/public` and type `vagrant up`, wait a bit for Vagrant to do its thing and report that it's done, send my browser to `<a href="http://192.168.33.10`" class="">http://192.168.33.10`</a>, and go to town.</div></div><div class=""><div class=""><br class=""></div></div><div class=""><div class="">My use of Vagrant is at the low end of the complexity spectrum. There is so much more that Vagrant can do and I'm still moving slowly towards more advanced uses such as sharing the server across the local network so that other devices (my iPad and iPhone) can access the server. Or even sharing it across the Internet so that other people can see what I'm working on.</div><div class=""><br class=""></div></div></blockquote><div class="" style="font-family: LucidaGrande;">The name = 'markup.raw.block.markdown’ begin pattern finds the first ```.</div><div class="" style="font-family: LucidaGrande;"><br class=""></div><div class="" style="font-family: LucidaGrande;">And the while pattern matches on Vagrant.configure("2") do |config| as it should.</div><div class="" style="font-family: LucidaGrande;"><br class=""></div><div class="" style="font-family: LucidaGrande;">But the while pattern fails on the empty line (a newline) and the match stops.</div><div class="" style="font-family: LucidaGrande;"><br class=""></div><div class="" style="font-family: LucidaGrande;">Why wouldn’t ^[^`{3}] succeed in matching a newline? ^[^`{3}]|\n doesn’t match either.</div><div class="" style="font-family: LucidaGrande;"><br class=""></div><div class="" style="font-family: LucidaGrande;">How should I be setting up the patterns?</div><blockquote class="" style="font-family: LucidaGrande; margin: 0px 0px 0px 40px; border: none; padding: 0px;"><div class=""><div class=""><br class=""></div></div></blockquote></div><div apple-content-edited="true" class="">
Bob<br class="">-------------------<br class="">Robert J. Rockefeller<br class="">Richmond Hill, GA<br class=""><a href="http://www.bobrockefeller.com" class="">www.bobrockefeller.com</a></div></div></body></html>