templateUrl: '/templates/directives/njaxComments.html',
424558
function (scope, element, attrs) {

					SubscriptionService.queryEntity(scope.target, scope.type).success( function(response){


						scope.posting = false;

						scope.count = response.length;
						var jElement = angular.element(element[0]);
						jElement.html(scope.count);

					}).error(function(err){
						throw err;
					})

				}
63931
function compileTemplate(name) {
        // Directive compile function
        return function (tElement, tAttrs, transclude) {
            var rootElement = document.createElement("div");
            Object.keys(tAttrs).forEach(function (key) {
                if (key[0] !== '$') {
                    rootElement.setAttribute(key, tAttrs[key]);
                }
            });
            var immediateToken;
            // Directive link function
            return function ($scope, elements, attrs, parents) {
                var parent = parents.reduce(function (found, item) { return found || item; });
                parent[name] = function (itemPromise) {
                    // Actual item renderer
                    return WinJS.Promise.as(itemPromise).then(function (item) {
                        var itemScope = $scope.$new();
                        itemScope.item = item;
                        var result = rootElement.cloneNode(false);
                        transclude(itemScope, function (clonedElement) {
                            for (var i = 0, len = clonedElement.length; i < len; i++) {
                                result.appendChild(clonedElement[i]);
                            }
                        });
                        WinJS.Utilities.markDisposable(result, function () {
                            itemScope.$destroy();
                        });
                        immediateToken = immediateToken || setImmediate(function () {
                            immediateToken = null;
                            itemScope.$apply();
                        });
                        return result;
                    })
                };
            };
        };
    }
171061
static protected String extractTemplateUrl(String viewName){
		int i1 = -1;
		int i2 = -1;
		int i3 = -1;
		int i4 = -1;
		i1 = viewName.indexOf(LEFT_BRACKET);
		if (i1 != -1){
			i2 = viewName.indexOf(LEFT_BRACKET, i1+1);
		}
		i4 = viewName.lastIndexOf(RIGHT_BRACKET);
		if (i4 != -1){
			i3 = viewName.lastIndexOf(RIGHT_BRACKET, i4-1);
		}
		
		if ((i1 == -1 || i4 == -1)		// no starting or ending 
				|| (i2*i3 < 0) 			// not matching
				|| (i2 > i3)){			// not matching
			return viewName;		// no valid template descriptor
		}
		
		//////// the format is guaranteed to be valid after this point
		
		String url = null;
		
		if (i2 != -1){
			url = viewName.substring(i1+1, i2);		// prefix{url{...}}postfix
		}else{
			url = viewName.substring(i1+1, i4);		// prefix{url}postfix
		}

		if (i1 > 0){
			String prefix = viewName.substring(0, i1);
			url = prefix + url;
		}
		if (i4 < viewName.length() - 1){
			String postfix = viewName.substring(i4 + 1);
			url = url + postfix;
		}
		
		return url;
	}
417221
function() {
			// Add the CSS styles for anchor placeholders.
			var iconPath = CKEDITOR.getUrl( this.path + 'images' + ( CKEDITOR.env.hidpi ? '/hidpi' : '' ) + '/anchor.png' ),
				baseStyle = 'background:url(' + iconPath + ') no-repeat %1 center;border:1px dotted #00f;background-size:16px;';

			var template = '.%2 a.cke_anchor,' +
				'.%2 a.cke_anchor_empty' +
				',.cke_editable.%2 a[name]' +
				',.cke_editable.%2 a[data-cke-saved-name]' +
				'{' +
					baseStyle +
					'padding-%1:18px;' +
					// Show the arrow cursor for the anchor image (FF at least).
					'cursor:auto;' +
				'}' +
				'.%2 img.cke_anchor' +
				'{' +
					baseStyle +
					'width:16px;' +
					'min-height:15px;' +
					// The default line-height on IE.
					'height:1.15em;' +
					// Opera works better with "middle" (even if not perfect)
					'vertical-align:text-bottom;' +
				'}';

			// Styles with contents direction awareness.
			function cssWithDir( dir ) {
				return template.replace( /%1/g, dir == 'rtl' ? 'right' : 'left' ).replace( /%2/g, 'cke_contents_' + dir );
			}

			CKEDITOR.addCss( cssWithDir( 'ltr' ) + cssWithDir( 'rtl' ) );
		}
840682
async function _renderContent(uriPath) {
  const pathAnalyzer = new services.UriPathAnalyzer(uriPath, this.paths.www);
  const [file, pathSection, pathRecordId] = pathAnalyzer.perform();
  const content = {};

  if (!file) {
    throw Boom.notFound('Template not found');
  }

  const partials = glob.sync(resolve(this.paths.www, '**/_*.html'));
  const template = Template.fromFile(file, this.paths.www, partials, { parseConditionals: true });
  const tree = template.parse();

  /* eslint-disable no-restricted-syntax */
  for (const [token, args] of Object.entries(tree)) {
    const recordId = pathSection === args.name ? pathRecordId : null;
    /* eslint-disable-next-line no-await-in-loop */
    let recordContent = await Section.contentFor(args, recordId);

    if (this.config.placeholders) {
      recordContent = _addPlaceholders(recordContent, args);
    }

    content[token] = recordContent;
  }
  /* eslint-enable no-restricted-syntax */

  return template.render(content);
}
914786
function(source, params) {
			var tags = Tags.tagTemplates;
			var proposals = [];
			var namePrefix = params.prefix ? params.prefix : "";
			var precedingChar = source.charAt(params.offset - namePrefix.length - 1);
			if (namePrefix.length === 0){
				while (precedingChar === '!' || precedingChar === '-'){
					namePrefix = precedingChar + namePrefix;
					precedingChar = source.charAt(params.offset - namePrefix.length - 1);
				}
				if (namePrefix.match(/^!-?$/)){
					var prefix = '<' + namePrefix;
					proposals.push(this.makeComputedProposal("<!-- ", Messages['openCommentName'], " - <!-- -->", null, prefix)); //$NON-NLS-1$ //$NON-NLS-2$
					return proposals;
				}
			}
			var leadingBracket = false;
			if (precedingChar === '<'){
				leadingBracket = true;
			}
			for(var j = 0; j < tags.length; j++) {
				var tag = tags[j];
				if(jsUtil.looselyMatches(namePrefix, tag.name)) {
					var hover = Object.create(null);
					hover.type = 'markdown'; //$NON-NLS-1$
					hover.content = "";
					if (tag.obsolete){
						hover.content += Messages['obsoleteTag'];
					}
					if (tag.doc){
						hover.content += tag.doc;
					}
					if(tag.url) {
						hover.content += i18nUtil.formatMessage(Messages['onlineDocumentation'], tag.url);
					}
					var proposalText = "";
					var desc = "";
					// TODO Allow tags to have custom templates
					tag.type = 'single'; //$NON-NLS-1$
					switch (tag.type) {
						case 'single':
							proposalText = "<" + tag.name + "></" + tag.name + ">"; //$NON-NLS-1$
//							desc = " - " + proposalText;
							if (leadingBracket){
								proposalText = proposalText.substring(1);
							}
							break;
						case 'multi':
							proposalText = "<" + tag.name + ">\n\n</" + tag.name + ">"; //$NON-NLS-1$
//							desc = " - " + proposalText;
							if (leadingBracket){
								proposalText = proposalText.substring(1);
							}
							break;
						case 'empty':
							proposalText = "<" + tag.name + "/>"; //$NON-NLS-1$
//							desc = " - " + proposalText;
							if (leadingBracket){
								proposalText = proposalText.substring(1);
							}
							break;
						default:
							proposalText = "<" + tag.name + ">";
//							desc = " - " + proposalText;
							if (leadingBracket){
								proposalText = proposalText.substring(1);
							}
							break;
					}
					var style = "emphasis";
					if (tag.obsolete){
						style = "strikethrough";
						//desc += Messages['obsoleteTagDesc'];
					}
					var proposal = this.makeComputedProposal(proposalText, tag.name, desc, hover, params.prefix, style);
					// The prefix not being includes prevents content assist staying open while typing
//					if (source.charAt(params.offset - prefix.length - 1) === '<'){
//						prefix = '<' + prefix;
//						proposal.prefix = prefix;
//					}
					proposal.escapePosition = params.offset - namePrefix.length + tag.name.length + 2;
					if(leadingBracket){
						proposal.escapePosition--;
					}
					proposals.push(proposal);
				}
			}
			return proposals;	
		}
749290
function angularTemplate (p, json) {

    var prefix = (p.prefix !== "") ? p.prefix + "." : "",
        tpl = 'angular.module("'+ prefix +  p.filename +'",["ng"]).run(["$templateCache",';

    tpl += 'function($templateCache) {';

    for (var key in json) {
        if (json.hasOwnProperty(key)) {
            tpl += '$templateCache.put("'+ key +'",';
            tpl += JSON.stringify(json[key]);
            tpl += ');'
        }
    }

    tpl += '}])';

    return tpl;
}
923775
function (scanner, quote) {
  if (quote) {
    if (scanner.peek() !== quote)
      return null;
    scanner.pos++;
  }

  var tokens = [];
  var charsTokenToExtend = null;

  var charRef;
  while (true) {
    var ch = scanner.peek();
    var templateTag;
    var curPos = scanner.pos;
    if (quote && ch === quote) {
      scanner.pos++;
      return tokens;
    } else if ((! quote) && (HTML_SPACE.test(ch) || ch === '>')) {
      return tokens;
    } else if (! ch) {
      scanner.fatal("Unclosed attribute in tag");
    } else if (quote ? ch === '\u0000' : ('\u0000"\'<=`'.indexOf(ch) >= 0)) {
      scanner.fatal("Unexpected character in attribute value");
    } else if (ch === '&' &&
               (charRef = getCharacterReference(scanner, true,
                                                quote || '>'))) {
      tokens.push(charRef);
      charsTokenToExtend = null;
    } else if (scanner.getTemplateTag &&
               ((templateTag = scanner.getTemplateTag(
                 scanner, TEMPLATE_TAG_POSITION.IN_ATTRIBUTE)) ||
                scanner.pos > curPos /* `{{! comment}}` */)) {
      if (templateTag) {
        tokens.push({t: 'TemplateTag',
                     v: assertIsTemplateTag(templateTag)});
        charsTokenToExtend = null;
      }
    } else {
      if (! charsTokenToExtend) {
        charsTokenToExtend = { t: 'Chars', v: '' };
        tokens.push(charsTokenToExtend);
      }
      charsTokenToExtend.v += (ch === '\r' ? '\n' : ch);
      scanner.pos++;
      if (quote && ch === '\r' && scanner.peek() === '\n')
        scanner.pos++;
    }
  }
}
1335354
def markdown(self,md,base_url='..'):
        
        print("\nProcessing documentation comments...")
        ford.sourceform.set_base_url(base_url)        
        if self.settings['warn'].lower() == 'true': print()
        for src in self.allfiles:
            src.markdown(md, self)
1023976
def look_for_directives_in(context, comment)

      preprocess = SM::PreProcess.new(@input_file_name,
                                      @options.rdoc_include)

      preprocess.handle(comment) do |directive, param|
        case directive
        when "stopdoc"
          context.stop_doc
          ""
        when "startdoc"
          context.start_doc
          context.force_documentation = true
          ""

        when "enddoc"
          #context.done_documenting = true
          #""
          throw :enddoc

        when "main"
          options = Options.instance
          options.main_page = param
	  ""

        when "title"
          options = Options.instance
          options.title = param
          ""

        when "section"
          context.set_current_section(param, comment)
          comment.replace("") # 1.8 doesn't support #clear
          break 
        else
          warn "Unrecognized directive '#{directive}'"
          break
        end
      end

      remove_private_comments(comment)
    end
1250887
function getComponents(templateSrc, filename, options){
  var $ = cheerio.load('<div>' + templateSrc + '</div>');
  var components = [];

  var nodeIndex = 0;

  $('*').contents().map(function(index, $el) {
  
    if ($el.type === 'comment') {
      var src = $el.data.trim();

      // keyword check
      if(isComponentComment(src, options.keyword)){
        src = src.substring(options.keyword.length);
        var meta = YAML.safeLoad(src) || {};
        
        var nodes = getComponentHtml($, $el, $.html($($el).nextAll()), options.keyword, meta);
        var html = nodes.filter(function(node) { 
          return (node.trim() !== '');
        }).join('\n');

        var output = render(html, meta, options.block);

        var component = {
          meta: meta,
          file: filename,
          output: output.trim()
        };

        // push comment
        return components.push(component);
      }
    }
  }.bind(this));

  return components;
}
38313
function html(files, dir, useIcons, view, req) {
  return '<ul id="files" class="view-' + escapeHtml(view) + '">'
    + (view == 'details' ? (
      '<li class="header">'
      + '<span class="name">Name</span>'
      + '<span class="size">Size</span>'
      + '<span class="date">Modified</span>'
      + '</li>') : '')
    + files.map(function(file){
    var isDir = '..' == file.name || (file.stat && file.stat.isDirectory())
      , classes = []
      , path = dir.split('/').map(function (c) { return encodeURIComponent(c); });

    if (useIcons) {
      classes.push('icon');

      if (isDir) {
        classes.push('icon-directory');
      } else {
        var ext = extname(file.name);
        var icon = iconLookup(file.name);

        classes.push('icon');
        classes.push('icon-' + ext.substring(1));

        if (classes.indexOf(icon.className) === -1) {
          classes.push(icon.className);
        }
      }
    }

    path.push(encodeURIComponent(file.name));

    var date = file.stat && file.name !== '..'
      ? file.stat.mtime.toDateString() + ' ' + file.stat.mtime.toLocaleTimeString()
      : '';
    var size = file.stat && !isDir
      ? file.stat.size
      : '';

    return '<li><a href="'
      + escapeHtml(normalizeSlashes(normalize(req.prefixPath + path.join('/'))))
      + '" class="' + escapeHtml(classes.join(' ')) + '"'
      + ' title="' + escapeHtml(file.name) + '">'
      + '<span class="name">' + escapeHtml(file.name) + '</span>'
      + '<span class="size">' + escapeHtml(size) + '</span>'
      + '<span class="date">' + escapeHtml(date) + '</span>'
      + '</a></li>';

  }).join('\n') + '</ul>';
}
167773
@Override
	protected String rewriteUrl(GeneratorContext context, String content) throws IOException {

		// Here we create a new context where the bundle name is the Jawr
		// generator CSS path
		// The version of the CSS classpath for debug mode will be different
		// compare to the standard one
		JoinableResourceBundle tempBundle = new JoinableResourceBundleImpl(ResourceGenerator.CSS_DEBUGPATH, null, null,
				null, null, null, context.getConfig().getGeneratorRegistry());
		BundleProcessingStatus tempStatus = new BundleProcessingStatus(BundleProcessingStatus.FILE_PROCESSING_TYPE,
				tempBundle, context.getResourceReaderHandler(), context.getConfig());

		CSSURLPathRewriterPostProcessor postProcessor = new CSSURLPathRewriterPostProcessor();
		String resourcePath = context.getPath();
		tempStatus.setLastPathAdded(getGeneratorPrefix() + GeneratorRegistry.PREFIX_SEPARATOR + resourcePath);
		StringBuffer resourceData = postProcessor.postProcessBundle(tempStatus, new StringBuffer(content));
		return resourceData.toString();

	}
247975
function (moduleName, filepath, options) {
    var quoteChar = options.quoteChar;
    var indentString = options.indentString;
    var withModule = !options.singleModule;
    var content = getContent(filepath, options);
    var doubleIndent = indentString + indentString;
    var strict = (options.useStrict) ? indentString + quoteChar + 'use strict' + quoteChar + ';\n' : '';
    var compiled = '';

    if (withModule) {
      compiled += 'angular.module(' + quoteChar + moduleName +
        quoteChar + ', []).run([' + quoteChar + '$templateCache' + quoteChar + ', function($templateCache) {\n' + strict;
    }

    compiled += indentString + '$templateCache.put(' + quoteChar + moduleName + quoteChar +
      ',\n' + doubleIndent + quoteChar + content + quoteChar + ');';

    if (withModule) {
      compiled += '\n}]);\n';
    }

    return compiled;
  }
707607
function(template) {

		var i = 0,
			count = template.length,
			result = [];

		for (; i < count; i++) {

			if (typeof(template[i]) == 'string') {

				if (!Lava.EMPTY_REGEX.test(template[i])) Lava.t("Text between tags is not allowed in this context. You may want to use a lava-style comment ({* ... *})");

			} else {

				result.push(template[i]);

			}

		}

		return result;

	}
446795
function (templateCtxt) {
            var moduleCtrl = templateCtxt.moduleCtrlPrivate;
            // find associated module
            var modules = this._data.modules, i, l;
            for (i = 0, l = modules.length; i < l; i++) {
                if (modules[i].moduleCtrl == moduleCtrl) {
                    this._data.selectedModule = modules[i];
                    break;
                } else {
                    this._data.selectedModule = null;
                }
            }
            // find associated template description
            this._data.selectedTemplate = this._findTemplateDes(this._data.templates, templateCtxt);

        }
1041472
function linkForInput() {
                var valTemplate = config.zValidateTemplate;
                var requiredTemplate = config.zRequiredTemplate || '';
                var decorator = angular.element('<span class="z-decorator"></span>');
                if (attrs.zAppendTo){
                    angular.element(document.querySelector(attrs.zAppendTo)).append(decorator);
                } else {
                    element.after(decorator);
                }

                // unwrap bound elements
                decorator = decorator[0];
                scope.$watch(info.getValErrs, valErrsChanged);

                // update the message in the validation template
                // when a validation error changes on an input control
                // newValue is either a string or null (null when no bound entity)
                function valErrsChanged(newValue) {

                    // HTML5 custom validity
                    // http://dev.w3.org/html5/spec-preview/constraints.html#the-constraint-validation-api
                    if (domEl.setCustomValidity) {
                        /* only works in HTML 5. Maybe should throw if not available. */
                        domEl.setCustomValidity(newValue || '');
                    }

                    var errorHtml = newValue ? valTemplate.replace(/%error%/, newValue) : "";
                    var isRequired = info.getIsRequired();
                    var requiredHtml = isRequired ? requiredTemplate : '';
                    decorator.innerHTML = (isRequired || !!errorHtml) ? requiredHtml + errorHtml : "";
                }
            }