Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Poem Splitter #3

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/main/webapp/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
<meta name="description" content="Collins Nji" />
<link rel="stylesheet" href="css/style.css">
<script src="script.js"></script>
<title>The Poem Critic</title>
</head>

Expand Down
5 changes: 5 additions & 0 deletions src/main/webapp/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
//Splits string containing poem into array of lines
function splitPoem(poem) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if this is required in the client. The server is probably going to get the uploaded poem as a json, do the split and save it to datastore. Please sync with colin on the server poem upload endpoint that he is working on.

var lines = poem.split("\n");
return lines;
};