Upload File/Enter Text
-Converted Text
{{ resp_text }}
diff --git a/src/functions.py b/src/functions.py index fdb2929..673fd12 100755 --- a/src/functions.py +++ b/src/functions.py @@ -52,6 +52,8 @@ def convert_text(text: str, format_indents:bool=True): return "\n".join(changed_lines).strip() def match_and_replace(line:str, format_indents:bool=True) -> str: + if re.search(":$", line) != None: + return line if format_indents: line, num = re.subn("(\t+.)(..*)", rf"\1 {{{{c1::\2}}}}", line) if num > 0: diff --git a/src/static/style.css b/src/static/style.css index 087dd99..19665fc 100755 --- a/src/static/style.css +++ b/src/static/style.css @@ -40,28 +40,44 @@ h1 { margin-bottom: 0.5rem; } -textarea { +#left { grid-area: input; } -pre { +#right { grid-area: output; } -main > div { +#copy-btn { + align-self: flex-start; +} + +main > div, +main > form { width: 100%; box-sizing: border-box; + display: flex; + flex-direction: column; + gap: 0.5rem; } textarea { width: 100%; - height: 20vh; + height: 100%; margin: 20px 0; -webkit-box-sizing: border-box; -moz-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"] { display: none; } diff --git a/src/templates/index.html b/src/templates/index.html index acfc7ce..da234a4 100755 --- a/src/templates/index.html +++ b/src/templates/index.html @@ -7,27 +7,26 @@
{{ resp_text }}