• Home
  • Raw
  • Download

Lines Matching +full:check +full:- +full:whitespace

3 # stream ::= STREAM-START document* STREAM-END
4 # document ::= DOCUMENT-START node DOCUMENT-END
6 # sequence ::= SEQUENCE-START node* SEQUENCE-END
7 # mapping ::= MAPPING-START (node node)* MAPPING-END
44 # Encoding can be overridden by STREAM-START.
70 # - current position.
71 # - is it a whitespace?
72 # - is it an indention character
73 # (indentation space, '-', '?', or ':')?
76 self.whitespace = True
107 # Reset the state attributes (to clear self-references)
139 level -= 1
141 level = -1
200 self.write_indicator('---', True)
275 self.write_indicator('[', True, whitespace=True)
283 self.flow_level -= 1
295 self.flow_level -= 1
311 self.write_indicator('{', True, whitespace=True)
319 self.flow_level -= 1
336 self.flow_level -= 1
382 self.write_indicator('-', True, indention=True)
548 if handle[0] != '!' or handle[-1] != '!':
550 for ch in handle[1:-1]:
552 or ch in '-_'):
567 or ch in '-;/?!:@&=+$,_.~*\'()[]':
573 data = ch.encode('utf-8')
598 or ch in '-;/?:@&=+$,_.~*\'()[]' \
605 data = ch.encode('utf-8')
621 or ch in '-_'):
641 # Important whitespace combinations.
649 # Check document indicators.
650 if scalar.startswith('---') or scalar.startswith('...'):
654 # First character or preceded by a whitespace.
657 # Last character or followed by a whitespace.
671 # Check for indicators.
681 if ch == '-' and followed_by_whitespace:
696 # Check for line breaks, special, and unicode characters.
709 # Detect important whitespace combinations.
713 if index == len(scalar)-1:
722 if index == len(scalar)-1:
794 if self.encoding and self.encoding.startswith('utf-16'):
801 whitespace=False, indention=False):
802 if self.whitespace or not need_whitespace:
806 self.whitespace = whitespace
817 or (self.column == indent and not self.whitespace):
820 self.whitespace = True
821 data = ' '*(indent-self.column)
830 self.whitespace = True
959 if 0 < end < len(text)-1 and (ch == ' ' or start >= end) \
960 and self.column+(end-start) > self.best_width and split:
969 self.whitespace = False
985 if text[-1] not in '\n\x85\u2028\u2029':
986 hints += '-'
987 elif len(text) == 1 or text[-2] in '\n\x85\u2028\u2029':
994 if hints[-1:] == '+':
1048 if hints[-1:] == '+':
1085 if not self.whitespace:
1091 self.whitespace = False
1104 self.whitespace = False
1123 self.whitespace = False