Skip to content
Snippets Groups Projects
Commit 5d9c8485 authored by Johannes Mey's avatar Johannes Mey
Browse files

Merge branch 'bugfix/12-xml-escaping-is-used' into 'dev'

Resolve "XML-escaping is used"

Closes #12

See merge request jastadd/relast2uml!7
parents ec2ab792 74b7079b
No related branches found
No related tags found
2 merge requests!101.0.0,!7Resolve "XML-escaping is used"
Pipeline #12763 passed
@startuml
{{#PrintConfig}}
scale {{Scale}}
scale {{{Scale}}}
{{#Headers}}
{{Value}}
{{{Value}}}
{{/Headers}}
{{/PrintConfig}}
{{#DumpNodes}}
{{#isAstNode}}
{{^Invisible}}
object "{{{labelAndTextColor}}}" as {{name}} {{#backgroundColor}}#{{{backgroundColor}}}{{/backgroundColor}} {
object "{{{labelAndTextColor}}}" as {{{name}}} {{#backgroundColor}}#{{{backgroundColor}}}{{/backgroundColor}} {
{{#DumpTokens}}
{{#isDumpValueToken}}
{{label}} = {{{Value}}}
{{{label}}} = {{{Value}}}
{{/isDumpValueToken}}
{{/DumpTokens}}
}
......@@ -24,7 +24,7 @@ object "{{{labelAndTextColor}}}" as {{name}} {{#backgroundColor}}#{{{backgroundC
{{#DumpTokens}}
{{^Invisible}}
{{^isDumpValueToken}}
{{outerNodeName}} ..> {{innerNodeName}} : {{label}}
{{{outerNodeName}}} ..> {{{innerNodeName}}} : {{{label}}}
{{/isDumpValueToken}}
{{/Invisible}}
{{/DumpTokens}}
......@@ -32,13 +32,13 @@ object "{{{labelAndTextColor}}}" as {{name}} {{#backgroundColor}}#{{{backgroundC
{{#isList}}
{{#InnerDumpNodes}}
{{#bothVisible}}
{{outerNodeName}} *-- {{innerNodeName}} : {{label}}
{{{outerNodeName}}} *-- {{{innerNodeName}}} : {{{label}}}
{{/bothVisible}}
{{/InnerDumpNodes}}
{{/isList}}
{{^isList}}
{{#bothVisible}}
{{outerNodeName}} *-- {{innerNodeName}} : {{label}}
{{{outerNodeName}}} *-- {{{innerNodeName}}} : {{{label}}}
{{/bothVisible}}
{{/isList}}
{{/DumpChildNodes}}
......@@ -46,27 +46,27 @@ object "{{{labelAndTextColor}}}" as {{name}} {{#backgroundColor}}#{{{backgroundC
{{#isList}}
{{#InnerDumpNodes}}
{{#bothVisible}}
{{outerNodeName}} {{#Bidirectional}}<{{/Bidirectional}}--> {{innerNodeName}} : {{label}}
{{{outerNodeName}}} {{#Bidirectional}}<{{/Bidirectional}}--> {{{innerNodeName}}} : {{{label}}}
{{/bothVisible}}
{{/InnerDumpNodes}}
{{/isList}}
{{^isList}}
{{#bothVisible}}
{{outerNodeName}} {{#Bidirectional}}<{{/Bidirectional}}--> {{innerNodeName}} : {{label}}
{{{outerNodeName}}} {{#Bidirectional}}<{{/Bidirectional}}--> {{{innerNodeName}}} : {{{label}}}
{{/bothVisible}}
{{/isList}}
{{/DumpRelations}}
{{^Invisible}}
{{#InvisiblePath}}
{{#InnerDumpNodes}}
{{outerNodeName}} o.. {{innerNodeName}}
{{{outerNodeName}}} o.. {{{innerNodeName}}}
{{/InnerDumpNodes}}
{{/InvisiblePath}}
{{/Invisible}}
{{#PrintConfig}}{{#orderChildren}}
{{#myChildren}}
{{#hasSuccessor}}
{{name}} -[hidden]right-> {{#successor}}{{name}}{{/successor}}
{{{name}}} -[hidden]right-> {{#successor}}{{{name}}}{{/successor}}
{{/hasSuccessor}}
{{/myChildren}}
{{/orderChildren}}{{/PrintConfig}}
......@@ -75,7 +75,7 @@ object "{{{labelAndTextColor}}}" as {{name}} {{#backgroundColor}}#{{{backgroundC
{{#Debug}}
legend right
%date()
dumpAst: {{version}}
dumpAst: {{{version}}}
plantuml: %version()
endlegend
{{/Debug}}
......
......@@ -28,6 +28,17 @@ public class TestSimple {
assertEquals(0, actualRoot.getNumDumpRelation());
}
@Test
public void testCustomPreamble() {
Root root = createRoot(null, null);
String preamble = "{<\n>\n}";
ExposingDumpBuilder builder = new ExposingDumpBuilder(root);
builder.excludeNullNodes().customPreamble(preamble);
DumpAst dumpAst = builder.build();
String puml = dumpAst.toPlantUml();
assertThat(puml).contains(preamble);
}
@Test void testChildlessNonterminal() {
Root root = createRoot(createA(A_NAME, a -> a.setD(new D())), null);
List<DumpNode> nodes = TestUtils.dumpModel(root);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment