Skip to content

HTML strings rejected #19

@PlanetEarthSoftware

Description

@PlanetEarthSoftware

Dot allows html rather than text labels, delimited by angle brackets, e.g:

digraph D {

  node [shape=plaintext]

  FOO [ label = <The <font color='red'><b>foo</b></font>,<br/> the <font point-size='20'>bar</font> and<br/> the <i>baz</i>> ];

  FOO -> {BAR, BAZ};

}

HTML node label.dot.zip

HTML node label dot

This would be tricky to add and maintain backwards compatibility, we need to know whether the string was a normal string/"quoted string" or an .
Idea 1. Store the html string with the normal strings but have a method on Edge isHtml(string) that checks if the string was an html string, stored, possibly if F# supports it, a new HashMap(ReferenceEqualityComparer.Instance) where the string is matched by reference equals, checking it is the same string, rather than a string with the same value.

Idea 2. (not backwards compatible) store a DotString or a HtmlString both derived from DotValue so the reader can check which type of string it is. HtmlString could have a method getString() to extract just the text and convert
to '\n'.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions