Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit005ed1b

Browse files
committed
Improved format
1 parent87f6b61 commit005ed1b

File tree

1 file changed

+10
-20
lines changed

1 file changed

+10
-20
lines changed

‎src/main/java/generatejavadoc/Main.java

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -114,26 +114,10 @@ public static void main(String[] args) throws IOException {
114114
StringUtils.replaceEach(
115115
PATTERN.splitAsStream(readmeMdText)
116116
.map(
117-
line -> {
118-
String
119-
firstLine =
120-
line
121-
.replace(
122-
"\\.",
123-
" -")
124-
+"\\.";
125-
Stringstr =
126-
index[
127-
0]++
128-
==0
129-
?firstLine
130-
:line;
131-
returnline
132-
.isEmpty()
133-
?" *"
134-
:" * "
135-
+str;
136-
})
117+
line ->
118+
getString(
119+
line,
120+
index))
137121
.collect(
138122
Collectors.joining(
139123
"\n")),
@@ -161,6 +145,12 @@ public static void main(String[] args) throws IOException {
161145
}
162146
}
163147

148+
privatestaticStringgetString(Stringline,int[]index) {
149+
StringfirstLine =line.replace("\\."," -") +"\\.";
150+
Stringstr =index[0]++ ==0 ?firstLine :line;
151+
returnline.isEmpty() ?" *" :" * " +str;
152+
}
153+
164154
privatestaticbyte[]getBytes(
165155
StringsolutionJavaText,StringreadmeMdJavadoc,StringpublicClass) {
166156
returnsolutionJavaText

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp