File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed
lib/godot/_internal/utils Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change 11name : Build
22
33on :
4+ push :
45 pull_request :
56 workflow_dispatch :
67 inputs :
Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ def _remove_sgr(text: str) -> str:
5959
6060def reformat_doc_bbcode (text : str , for_tty : None | bool = None ) -> str :
6161 if for_tty is None :
62- for_tty = sys .stdout .isatty ()
62+ for_tty = sys .stdout .isatty () if sys . stdout else False
6363
6464 replacements = _replacements_for_tty if for_tty else _replacements
6565
@@ -82,11 +82,9 @@ def replace(match_):
8282 return f'{ replacements .get ("b" , "" )} { name } { replacements .get ("_b" , "" )} '
8383
8484 text = re .sub (r'\[(?P<close>/)?(?P<name>[-_.\w/]+)( (?P<value>[-_.\w/]+))?\]' , replace , text )
85- text = text .replace ('\n ' , '\n \n ' , 1 ) # separate first line from the rest by one blank line
85+ text = text .replace ('\n ' , '\n \n ' , 1 ) # Separate first line from the rest by one blank line
8686
87- # TODO: urls
88- # TODO: word wrap
87+ # TODO: Handle URLs
88+ # TODO: Implement word wrap if necessary
8989
9090 return text
91-
92-
You can’t perform that action at this time.
0 commit comments