Update functions.py
All checks were successful
Publish Docker image / Push Docker image to Docker Hub (push) Successful in -4s
All checks were successful
Publish Docker image / Push Docker image to Docker Hub (push) Successful in -4s
This commit is contained in:
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
import re
|
import re
|
||||||
import codecs
|
import codecs
|
||||||
from typing import Literal
|
|
||||||
import pdfplumber
|
import pdfplumber
|
||||||
|
|
||||||
|
|
||||||
@@ -63,9 +62,7 @@ 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(
|
def match_and_replace(line: str, format_indents: bool = True):
|
||||||
line: str, format_indents: bool = True, as_indent: bool = False
|
|
||||||
) -> str | Literal[True]:
|
|
||||||
if re.search(":$", line) is not None:
|
if re.search(":$", line) is not None:
|
||||||
return True
|
return True
|
||||||
if format_indents:
|
if format_indents:
|
||||||
|
|||||||
Reference in New Issue
Block a user