Skip to content

Commit a4bb7e1

Browse files
authored
Merge pull request #1 from irtsa-dev/irtsa-dev-patch-1
Irtsa dev patch 1
2 parents 445dcd8 + 7e15db9 commit a4bb7e1

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,3 +81,6 @@ Valid tags to utilize:
8181
- r
8282
- Will reset back to default, you can also specify what to reset and provide a list (but only accepts t,b,d).
8383
- \<r\> | \<r=td\>
84+
- nl
85+
- Indicates a newline (basically doing `\n`)
86+
- \<nl\>

termicol/termicol.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,9 @@ def __convertParsedContent(content: list):
133133
if 'd' in reset: decorations = []
134134
newcontent.append('\033[0m')
135135

136+
elif '<nl>' in content[i]:
137+
newcontent.append('\n')
138+
136139
elif any([True for code in __Codes['textcolor'] if code in content[i]]):
137140
color = content[i].split('=')[1].replace('>','')
138141
if color in __Colors: textColor = __createColor(__Colors[color], content[i])
@@ -196,4 +199,4 @@ def tprint(content: str, end = '\n') -> None:
196199
'''
197200
Sends content to python's print function after additional parsing and reconstructing.
198201
'''
199-
print(__convertParsedContent(__parseContent(content)), end = end)
202+
print(__convertParsedContent(__parseContent(content)), end = end)

0 commit comments

Comments
 (0)