]> granicus.if.org Git - graphviz/commitdiff
Add ishtml function for checking for HTML strings
authorEmden Gansner <erg@research.att.com>
Fri, 4 May 2012 16:33:15 +0000 (12:33 -0400)
committerEmden Gansner <erg@research.att.com>
Fri, 4 May 2012 16:33:15 +0000 (12:33 -0400)
lib/gvpr/compile.c
lib/gvpr/gprdata

index e3d800ec0f3e8214751bf5b66299a753e115b9da..9897b2f34aa95aa3ec455a470fdcabf685509d23 100644 (file)
@@ -1380,10 +1380,12 @@ getval(Expr_t * pgm, Exnode_t * node, Exid_t * sym, Exref_t * ref,
        case F_canon:
            v.string = canon(pgm, args[0].string);
            break;
+       case F_ishtml:
+           v.integer = aghtmlstr(args[0].string);
+           break;
        case F_html:
            gp = INT2PTR(Agraph_t *, args[0].integer);
            if (gp) {
-               v.string = toHtml(gp, args[1].string);
            } else {
                error(ERROR_WARNING, "NULL graph passed to html()");
                v.string = 0;
index 4c62bebffdddf277a051f48c9b2126953330496f..6df9ee13f20b827eeedc946dc7100ec6ad8c9769 100644 (file)
@@ -101,6 +101,7 @@ F_yof       "yOf"          FUNCTION S|A(1,S)
 F_llof      "llOf"         FUNCTION S|A(1,S)
 F_urof      "urOf"         FUNCTION S|A(1,S)
 F_html      "html"         FUNCTION S|A(1,G)|A(2,S)
+F_ishtml    "ishtml"       FUNCTION I|A(1,S)
 F_canon     "canon"        FUNCTION S|A(1,S)
 F_get       "aget"         FUNCTION S|A(1,O)|A(2,S)
 F_set       "aset"         FUNCTION I|A(1,O)|A(2,S)|A(3,S)