From 6de021381facd7ae29ae04b1fc94b1a481d570d4 Mon Sep 17 00:00:00 2001 From: The-Lum <86879521+The-Lum@users.noreply.github.com> Date: Fri, 25 Aug 2023 12:54:51 +0000 Subject: [PATCH 1/2] mod: Language Descriptor Improvement (adding some words) - [x] Add end form for: caption, title, footer, header - [x] Add stereotypes, circles, circled, member, attribute, field, method, public, private, protected to be conform with: - https://github.com/plantuml/plantuml/blob/a27ff9b7f272122028b0f583a333e3086829a742/src/net/sourceforge/plantuml/classdiagram/command/CommandHideShowByGender.java#L77 - https://github.com/plantuml/plantuml/blob/a27ff9b7f272122028b0f583a333e3086829a742/src/net/sourceforge/plantuml/classdiagram/command/CommandHideShowByVisibility.java#L68 - [x] Change `map` from keyword to type - [x] Add new type: protocol, struct, exception, metaclass, json - [x] Add new diagram: hcl, ebnf, regex, files Related issue: - https://forum.plantuml.net/18151/using-cypher-does-not-always-recognize-restricted-words Following this PR, on the same topic: - https://github.com/plantuml/plantuml/pull/586 --- .../plantuml/syntax/LanguageDescriptor.java | 32 ++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/src/net/sourceforge/plantuml/syntax/LanguageDescriptor.java b/src/net/sourceforge/plantuml/syntax/LanguageDescriptor.java index 5133a8a71..31bd7245a 100644 --- a/src/net/sourceforge/plantuml/syntax/LanguageDescriptor.java +++ b/src/net/sourceforge/plantuml/syntax/LanguageDescriptor.java @@ -87,6 +87,12 @@ public class LanguageDescriptor { type.add("label"); type.add("person"); type.add("annotation"); + type.add("protocol"); + type.add("struct"); + type.add("exception"); + type.add("metaclass"); + type.add("map"); + type.add("json"); keyword.add("@startwire"); keyword.add("@startbpm"); @@ -111,6 +117,10 @@ public class LanguageDescriptor { keyword.add("@startgit"); keyword.add("@startboard"); keyword.add("@startyaml"); + keyword.add("@starthcl"); + keyword.add("@startebnf"); + keyword.add("@startregex"); + keyword.add("@startfiles"); keyword.add("@endwire"); keyword.add("@endbpm"); keyword.add("@enduml"); @@ -134,11 +144,17 @@ public class LanguageDescriptor { keyword.add("@endgit"); keyword.add("@endboard"); keyword.add("@endyaml"); + keyword.add("@endhcl"); + keyword.add("@endebnf"); + keyword.add("@endregex"); + keyword.add("@endfiles"); keyword.add("as"); keyword.add("also"); keyword.add("autonumber"); keyword.add("caption"); + keyword.add("endcaption"); keyword.add("title"); + keyword.add("endtitle"); keyword.add("newpage"); keyword.add("box"); keyword.add("alt"); @@ -186,7 +202,9 @@ public class LanguageDescriptor { keyword.add("endif"); keyword.add("partition"); keyword.add("footer"); + keyword.add("endfooter"); keyword.add("header"); + keyword.add("endheader"); keyword.add("center"); keyword.add("rotate"); keyword.add("ref"); @@ -207,11 +225,15 @@ public class LanguageDescriptor { keyword.add("mainframe"); keyword.add("across"); keyword.add("stereotype"); + keyword.add("stereotypes"); keyword.add("split"); keyword.add("style"); keyword.add("sprite"); keyword.add("circle"); + keyword.add("circles"); + keyword.add("circled"); keyword.add("empty"); + keyword.add("member"); keyword.add("members"); keyword.add("description"); keyword.add("true"); @@ -224,8 +246,16 @@ public class LanguageDescriptor { keyword.add("dotted"); keyword.add("dashed"); keyword.add("bold"); - keyword.add("map"); keyword.add("together"); + keyword.add("attribute"); + keyword.add("attributes"); + keyword.add("field"); + keyword.add("fields"); + keyword.add("method"); + keyword.add("methods"); + keyword.add("public"); + keyword.add("private"); + keyword.add("protected"); preproc.add("!exit"); preproc.add("!include"); From adf71509c7e4a89b785d3f45f566afec95949070 Mon Sep 17 00:00:00 2001 From: The-Lum <86879521+The-Lum@users.noreply.github.com> Date: Fri, 25 Aug 2023 13:34:33 +0000 Subject: [PATCH 2/2] fix: Suppress of the `together` word to avoid warning of Cypher --- src/net/sourceforge/plantuml/utils/words.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/src/net/sourceforge/plantuml/utils/words.txt b/src/net/sourceforge/plantuml/utils/words.txt index 518cd0748..0c18e5906 100644 --- a/src/net/sourceforge/plantuml/utils/words.txt +++ b/src/net/sourceforge/plantuml/utils/words.txt @@ -1930,7 +1930,6 @@ tingle titillate titillating titillatingly -together togetherness tolerable toll