Adds debug info to html as HTML title tags.
517334
private function addDebugInfo(): void
    {
        $tpl = $this->getTplPath($this->widget->template);

        $this->html = "<span title='WidgetObj : ".get_class($this->widget).".php&#013;Template : {$tpl}{$this->cacheState()}'>{$this->html}</span>";
    }
1326461
public void debug(String format, Object... extra) {
    if (shouldLog(DEBUG)) {
      Log.d(tag, String.format(format, extra));
    }
  }
153253
def _debug_dump_dom(el):
    """"""
    import xml.dom.minidom
    s = [el.nodeName]
    att_container = el.attributes
    for i in range(att_container.length):
        attr = att_container.item(i)
        s.append('  @{a}="{v}"'.format(a=attr.name, v=attr.value))
    for c in el.childNodes:
        if c.nodeType == xml.dom.minidom.Node.TEXT_NODE:
            s.append('  {a} type="TEXT" data="{d}"'.format(a=c.nodeName, d=c.data))
        else:
            s.append('  {a} child'.format(a=c.nodeName))
    return '\n'.join(s)
116063
def add_debug(parser):
    """"""
    parser.add_argument(
        '-d', '--debug', action='store_const', const=logging.DEBUG, default=logging.INFO, help='Set DEBUG output')
269518
def debugDumpString(output, str):
    
    if output is not None: output.flush()
    libxml2mod.xmlDebugDumpString(output, str)
446358
private void printTitle(HtmlPage htmlPage, PrintWriter out) {
        out.println(String.format("BitvUnit %s Report - %s - %s", getBitvUnitVersion(), htmlPage.getUrl(), getFormattedDate()));
    }
354433
private void addBugCodes(Set<String> bugCodeSet) {
        Element root = document.getRootElement();
        for (String bugCode : bugCodeSet) {
            Element element = root.addElement("BugCode");
            element.addAttribute("abbrev", bugCode);
            Element description = element.addElement("Description");
            description.setText(I18N.instance().getBugTypeDescription(bugCode));
        }
    }
1087757
def ap_debug(object, options = {})
      object.ai(
        options.merge(html: true)
      ).sub(
        /^<pre([\s>])/,
        '<pre class="debug_dump"\\1'
      )
    end
82926
function (out) {
            if (this._cfgOk) {
                this._domId = this._createDynamicId();
                var tagName = this._cfg.type;
                var markup = ['<', tagName, ' id="', this._domId, '"'];
                if (this._cfg.attributes) {
                    markup.push(' ' + ariaUtilsHtml.buildAttributeList(this._cfg.attributes));
                }
                markup.push('></' + tagName + '>');
                out.write(markup.join(''));
            }
        }
323450
def debug_contents(self, indent=1, file=sys.stdout, _ids=None):
        """"""
        klasses = list(self.__class__.__mro__)
        klasses.reverse()

        # print special attributes "bottom up"
        previous_attrs = ()
        for c in klasses:
            attrs = getattr(c, '_debug_contents', ())

            # if we have seen this list already, move to the next class
            if attrs is previous_attrs:
                continue

            for attr in attrs:
                file.write("%s%s = %s\n" % ("    " * indent, attr, getattr(self, attr)))
            previous_attrs = attrs

        # build a list of property identifiers "bottom up"
        property_names = []
        properties_seen = set()
        for c in klasses:
            for prop in getattr(c, 'properties', []):
                if prop.identifier not in properties_seen:
                    property_names.append(prop.identifier)
                    properties_seen.add(prop.identifier)

        # print out the values
        for property_name in property_names:
            property_value = self._values.get(property_name, None)

            # printing out property values that are None is tedious
            if property_value is None:
                continue

            if hasattr(property_value, "debug_contents"):
                file.write("%s%s\n" % ("    " * indent, property_name))
                property_value.debug_contents(indent+1, file, _ids)
            else:
                file.write("%s%s = %r\n" % ("    " * indent, property_name, property_value))
295137
function mdAstToHtml(ast, lines) {
    if (lines == undefined)
        lines = [];

    // Adds each element of the array as markdown 
    function addArray(ast) {
        for (let child of ast)
            mdAstToHtml(child, lines);
        return lines;
    }

    // Adds tagged content 
    function addTag(tag, ast, newLine) {
        lines.push(startTag(tag));
        if (ast instanceof Array)
            addArray(ast); 
        else
            mdAstToHtml(ast, lines);
        lines.push(endTag(tag));
        if (newLine)
            lines.push('\r\n');
        return lines;
    }

    function addLink(url, astOrText) {
        lines.push(startTag('a', { href:url }));
        if (astOrText) {
            if (astOrText.children)
                addArray(astOrText.children);
            else
               lines.push(astOrText);
        }        
        
        lines.push(endTag('a')) ;
        return lines;
    }

    function addImg(url) {
        lines.push(startTag('img', { src:url }));
        lines.push(endTag('img')) ;
        return lines;
    }

    switch (ast.name)
    {
        case "heading": 
            {
                let headingLevel = ast.children[0];
                let restOfLine = ast.children[1];
                let h = headingLevel.allText.length;
                switch (h)
                {
                    case 1: return addTag("h1", restOfLine, true); 
                    case 2: return addTag("h2", restOfLine, true); 
                    case 3: return addTag("h3", restOfLine, true); 
                    case 4: return addTag("h4", restOfLine, true); 
                    case 5: return addTag("h5", restOfLine, true); 
                    case 6: return addTag("h6", restOfLine, true); 
                    default: throw "Heading level must be from 1 to 6"
                }
            }
        case "paragraph":   
            return addTag("p", ast.children, true);
        case "unorderedList":
            return addTag("ul", ast.children, true);
        case "orderedList":
            return addTag("ol", ast.children, true);
        case "unorderedListItem":
            return addTag("li", ast.children, true);
        case "orderedListItem":
            return addTag("li", ast.children, true);
        case "inlineUrl":
            return addLink(ast.allText, ast.allText);
        case "bold":
            return addTag("b", ast.children);
        case "italic":
            return addTag("i", ast.children);
        case "code":
            return addTag("code", ast.children);
        case "codeBlock":
            return addTag("pre", ast.children);
        case "quote":
            return addTag("blockquote", ast.children, true);
        case "link":
            return addLink(ast.children[1].allText, ast.children[0]);
        case "image":
            return addImg(ast.children[0]);
        default:
            if (ast.isLeaf)
                lines.push(ast.allText);
            else 
                ast.children.forEach(function(c) { mdAstToHtml(c, lines); });
    }
    return lines;
}
570926
def render_markdown(post):
        
        from engineer.conf import settings

        # A hack to guarantee the YAML output is in a sensible order.
        # The order, assuming all metadata should be written, should be:
        # title
        # status
        # timestamp
        # link
        # via
        # via-link
        # slug
        # tags
        # updated
        # template
        # content-template
        # url
        d = [
            ('status', post.status.name),
            ('link', post.link),
            ('via', post.via),
            ('via-link', post.via_link),
            ('tags', post.tags),
            ('updated', post.updated_local.strftime(settings.TIME_FORMAT) if post.updated is not None else None),
            ('template', post.template if post.template != 'theme/post_detail.html' else None),
            ('content-template',
             post.content_template if post.content_template != 'theme/_content_default.html' else None),
        ]

        # The complete set of metadata that should be written is the union of the FINALIZE_METADATA.config setting and
        # the set of metadata that was in the file originally.
        finalization_config = FinalizationPlugin.get_settings()['config']
        metadata_to_finalize = set([m for m, s in finalization_config.iteritems() if post.status in s])
        metadata_to_finalize.update(post.metadata_original)

        if 'title' in metadata_to_finalize:
            # insert at the top of the list
            d.insert(0, ('title', post.title))
        if 'slug' in metadata_to_finalize:
            # insert right before tags
            d.insert(d.index(('tags', post.tags)), ('slug', post.slug))
        if 'timestamp' in metadata_to_finalize:
            # insert right after status
            d.insert(d.index(('status', post.status.name)), ('timestamp',
                                                             post.timestamp_local.strftime(settings.TIME_FORMAT)))
        if 'url' in metadata_to_finalize:
            # insert at end of list
            d.append(('url', post.url))

        metadata = ''
        for k, v in d:
            if v is not None and len(v) > 0:
                metadata += yaml.safe_dump(dict([(k, v)]), default_flow_style=False)

        # handle custom metadata
        if len(post.custom_properties):
            metadata += '\n'
            metadata += yaml.safe_dump(dict(post.custom_properties), default_flow_style=False)
        return settings.JINJA_ENV.get_template(post.markdown_template_path).render(metadata=metadata,
                                                                                   content=post.content_finalized,
                                                                                   post=post)
983838
function(context, descriptor, originalArgs) {
		var name = originalArgs[0],
			template = originalArgs[1];
		var newDescriptor = new SOD();
		template.toHTMLString(context, newDescriptor);
		tagOutput(descriptor, newDescriptor, name);
	}
768970
def info(self, request, message, extra_tags='', fail_silently=False):
        """"""
        add(self.target_name,
            request, constants.INFO, message, extra_tags=extra_tags,
            fail_silently=fail_silently)
306704
function addTag(tag, ast, newLine) {
        lines.push(startTag(tag));
        if (ast instanceof Array)
            addArray(ast); 
        else
            mdAstToHtml(ast, lines);
        lines.push(endTag(tag));
        if (newLine)
            lines.push('\r\n');
        return lines;
    }
846324
function (html) {
        var sep = '----------------------------------------------------------';
        console.log('\n' + sep);
        console.log('markedejs: HTML OUT (markedejs.DEBUG = false to silence)');
        console.log(sep);
        console.log(html);
        console.log(sep + '\n');
    }
1287477
private void addBugCategories(Set<String> bugCategorySet) {
        Element root = document.getRootElement();
        for (String category : bugCategorySet) {
            Element element = root.addElement("BugCategory");
            element.addAttribute("category", category);
            Element description = element.addElement("Description");
            description.setText(I18N.instance().getBugCategoryDescription(category));

            BugCategory bc = DetectorFactoryCollection.instance().getBugCategory(category);
            if (bc != null) { // shouldn't be null
                String s = bc.getAbbrev();
                if (s != null) {
                    Element abbrev = element.addElement("Abbreviation");
                    abbrev.setText(s);
                }
                s = bc.getDetailText();
                if (s != null) {
                    Element details = element.addElement("Details");
                    details.setText(s);
                }
            }
        }
    }