few styling changes + now ignoring lines with colon at the end
All checks were successful
Publish Docker image / Push Docker image to Docker Hub (push) Successful in -2s
All checks were successful
Publish Docker image / Push Docker image to Docker Hub (push) Successful in -2s
This commit is contained in:
@@ -52,6 +52,8 @@ def convert_text(text: str, format_indents:bool=True):
|
|||||||
return "\n".join(changed_lines).strip()
|
return "\n".join(changed_lines).strip()
|
||||||
|
|
||||||
def match_and_replace(line:str, format_indents:bool=True) -> str:
|
def match_and_replace(line:str, format_indents:bool=True) -> str:
|
||||||
|
if re.search(":$", line) != None:
|
||||||
|
return line
|
||||||
if format_indents:
|
if format_indents:
|
||||||
line, num = re.subn("(\t+.)(..*)", rf"\1 {{{{c1::\2}}}}", line)
|
line, num = re.subn("(\t+.)(..*)", rf"\1 {{{{c1::\2}}}}", line)
|
||||||
if num > 0:
|
if num > 0:
|
||||||
|
|||||||
@@ -40,28 +40,44 @@ h1 {
|
|||||||
margin-bottom: 0.5rem;
|
margin-bottom: 0.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
textarea {
|
#left {
|
||||||
grid-area: input;
|
grid-area: input;
|
||||||
}
|
}
|
||||||
|
|
||||||
pre {
|
#right {
|
||||||
grid-area: output;
|
grid-area: output;
|
||||||
}
|
}
|
||||||
|
|
||||||
main > div {
|
#copy-btn {
|
||||||
|
align-self: flex-start;
|
||||||
|
}
|
||||||
|
|
||||||
|
main > div,
|
||||||
|
main > form {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 0.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
textarea {
|
textarea {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 20vh;
|
height: 100%;
|
||||||
margin: 20px 0;
|
margin: 20px 0;
|
||||||
-webkit-box-sizing: border-box;
|
-webkit-box-sizing: border-box;
|
||||||
-moz-box-sizing: border-box;
|
-moz-box-sizing: border-box;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pre {
|
||||||
|
white-space: pre-wrap; /* Since CSS 2.1 */
|
||||||
|
white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
|
||||||
|
white-space: -pre-wrap; /* Opera 4-6 */
|
||||||
|
white-space: -o-pre-wrap; /* Opera 7 */
|
||||||
|
word-wrap: break-word; /* Internet Explorer 5.5+ */
|
||||||
|
}
|
||||||
|
|
||||||
input[type="file"] {
|
input[type="file"] {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,8 +7,7 @@
|
|||||||
<body>
|
<body>
|
||||||
<main>
|
<main>
|
||||||
<h1 class="input">Upload File/Enter Text</h1>
|
<h1 class="input">Upload File/Enter Text</h1>
|
||||||
<div id="left">
|
<form id="left" action="/upload" method="post" enctype="multipart/form-data" class="">
|
||||||
<form action="/upload" method="post" enctype="multipart/form-data" class="">
|
|
||||||
<div class="form_button">
|
<div class="form_button">
|
||||||
<label class="custom-file-upload">
|
<label class="custom-file-upload">
|
||||||
<input id="myfile" type="file" name="file" accept=".pdf" />
|
<input id="myfile" type="file" name="file" accept=".pdf" />
|
||||||
@@ -23,11 +22,11 @@
|
|||||||
<br />
|
<br />
|
||||||
<textarea name="text">{% if resp_text %}{{ base_text }}{% else %}Text in here{% endif %}</textarea>
|
<textarea name="text">{% if resp_text %}{{ base_text }}{% else %}Text in here{% endif %}</textarea>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
|
||||||
{% if resp_text %}
|
{% if resp_text %}
|
||||||
<h1 class="output">Converted Text</h1>
|
<h1 class="output">Converted Text</h1>
|
||||||
<div id="right">
|
<div id="right">
|
||||||
<button id="copy-btn">Copy Text</button>
|
<button id="copy-btn">Copy Text</button>
|
||||||
|
<br />
|
||||||
<pre id="myInput">
|
<pre id="myInput">
|
||||||
{{ resp_text }}
|
{{ resp_text }}
|
||||||
</pre
|
</pre
|
||||||
|
|||||||
Reference in New Issue
Block a user