Skip to content

Commit a5fbc20

Browse files
committed
Only replace "()" in a name with underscore if it's at the end.
This is a reversion to earlier behavior that seems to correct issues with the creation of double_underscore__ files and the non-creation of some method files. Unsure why newer behavior broke things; investigating.
1 parent e173fd0 commit a5fbc20

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed
8 Bytes
Binary file not shown.

java_generate/ReferenceGenerator/src/writers/BaseWriter.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,8 @@ protected static String getName(Doc doc) { // handle
151151

152152
protected static String getAnchorFromName(String name){
153153
// change functionName() to functionName_
154-
if( name.contains("()") ){
155-
name = name.replaceAll("()", "_");
154+
if( name.endsWith("()") ){
155+
name = name.replace("()", "_");
156156
}
157157
// change "(some thing)" to something
158158
if( name.contains("(") && name.contains(")") ){
@@ -166,7 +166,8 @@ protected static String getAnchorFromName(String name){
166166
name = name.replaceAll("\\[\\]", "");
167167
}
168168
// change "some thing" to "some_thing.html"
169-
return name.replace(" ", "_").concat(".html");
169+
name = name.replace(" ", "_").concat(".html");
170+
return name;
170171
}
171172

172173
static protected String getBasicDescriptionFromSource(ProgramElementDoc doc) {

0 commit comments

Comments
 (0)