javascript,regex,node.js,ghost-blog,showdown
You were close but not there yet. Your regex is not valid and should read: /[map (GIR 0AA|A-PR-UWYZ ?[0-9][ABD-HJLNP-UW-Z]{2})]/ig With i for case insensitiveness. See answer http://stackoverflow.com/a/29302162/475884 The actual export is invalid where instead window.Showdown.extensions.prettify = maps you should have window.Showdown.extensions.maps = maps Where you get // http://stackoverflow.com/questions/164979/uk-postcode-regex-comprehensive (function(){ var...
I realized I was fighting Angular (and losing quiet badly) with the way I was doing that. DOM in a controller is a no-no. And now I'm kind of angry about how easy it is once I started thinking properly and looking at the directive. Now instead of trying to...