Skip to content

Commit e6afc0b

Browse files
committed
chore: 代码格式化
1 parent e7d1761 commit e6afc0b

File tree

2 files changed

+18
-16
lines changed

2 files changed

+18
-16
lines changed

src/main/java/world/weibiansanjue/doctools/javadochub/repository/Repository.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,14 +123,16 @@ public Versioning version(String groupId, String artifactId) {
123123
* @since 1.0.0
124124
*/
125125
public int store(String groupId, String artifactId, String version) throws IOException {
126-
File docFile = Paths.get(LOCAL_PATH + File.separator + groupId + File.separator + artifactId + File.separator + version).toFile();
126+
File docFile = Paths.get(LOCAL_PATH + File.separator +
127+
groupId + File.separator + artifactId + File.separator + version).toFile();
127128
if (docFile.exists()) {
128129
return 202;
129130
}
130131

131132
String rep = repositoryUrl(groupId);
132133
String jarName = artifactId + "-" + version + "-javadoc.jar";
133-
String url = String.format("%s/%s/%s/%s/%s", rep, groupId.replace(".", "/"), artifactId, version, jarName);
134+
String url = String.format("%s/%s/%s/%s/%s",
135+
rep, groupId.replace(".", "/"), artifactId, version, jarName);
134136
log.info("download javadoc. url={}", url);
135137
ResponseEntity<byte[]> resp = null;
136138
try {
@@ -145,7 +147,8 @@ public int store(String groupId, String artifactId, String version) throws IOExc
145147
if (!resp.getStatusCode().is2xxSuccessful()) {
146148
return 500;
147149
}
148-
Path versionPath = Paths.get(JAR_PATH + File.separator + groupId + File.separator + artifactId + File.separator + version);
150+
Path versionPath = Paths.get(JAR_PATH + File.separator +
151+
groupId + File.separator + artifactId + File.separator + version);
149152
Path jarPath = versionPath.resolve(jarName);
150153
versionPath.toFile().mkdirs();
151154
Files.write(jarPath, resp.getBody());

supplemental-ui/partials/header-content.hbs

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
</div>
1717
</div>
1818
{{/if}}
19-
2019
</div>
20+
2121
<div id="topbar-nav" class="navbar-menu">
2222
<div class="navbar-item hide-for-print">
2323
<div id="group-id" class="field">
@@ -33,22 +33,21 @@
3333
</div>
3434
<div class="navbar-item">
3535
<span class="control">
36-
<button class="button" data-target="topbar-nav"
37-
onclick="toJavadoc()" >
36+
<button class="button" data-target="topbar-nav" onclick="toJavadoc()" >
3837
查看
3938
</button>
4039
</span>
4140
</div>
42-
</div>
4341
</div>
44-
<script type="text/javascript">
45-
function toJavadoc() {
46-
let groupId = document.getElementById('group-input').value;
47-
let artifactId = document.getElementById('artifact-input').value;
48-
if (groupId != '' && artifactId != '') {
49-
window.open('/doc/' + groupId + '/' + artifactId + '/', '_blank');
50-
}
51-
}
52-
</script>
42+
43+
<script type="text/javascript">
44+
function toJavadoc() {
45+
let groupId = document.getElementById('group-input').value;
46+
let artifactId = document.getElementById('artifact-input').value;
47+
if (groupId != '' && artifactId != '') {
48+
window.open('/doc/' + groupId + '/' + artifactId + '/', '_blank');
49+
}
50+
}
51+
</script>
5352
</nav>
5453
</header>

0 commit comments

Comments
 (0)