Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Syretta Man
simplewebapp
Commits
158269d6
Commit
158269d6
authored
Jan 16, 2020
by
Syretta Man
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modified condition
parent
aec7ecf4
Pipeline
#112911
passed with stages
in 51 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
src/main/java/ic/doc/WebServer.java
src/main/java/ic/doc/WebServer.java
+3
-2
No files found.
src/main/java/ic/doc/WebServer.java
View file @
158269d6
...
...
@@ -37,7 +37,7 @@ public class WebServer {
if
(
filetype
.
equals
(
"html"
))
{
resultPage
.
writeTo
(
resp
);
}
else
if
(
filetype
.
equals
(
"markdown"
))
{
}
else
if
(
filetype
.
equals
(
"markdown"
)
||
filetype
.
equals
(
"pdf"
)
)
{
File
file
=
new
File
(
"answer.md"
);
BufferedWriter
bw
=
new
BufferedWriter
(
new
FileWriter
(
file
));
...
...
@@ -74,7 +74,8 @@ public class WebServer {
if
(
filetype
.
equals
(
"pdf"
))
{
ProcessBuilder
pb
=
new
ProcessBuilder
();
pb
.
command
(
"pandoc"
,
"-s"
,
"-o"
,
"sample.pdf"
,
"sample.md"
);
String
[]
cm
=
{
"pandoc"
,
"-s"
,
"-o"
,
"sample.pdf"
,
"sample.md"
};
pb
.
command
(
cm
);
pb
.
start
();
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment