MCPcopy
hub / github.com/IvanMathy/Boop / testDocumentSeparator

Function testDocumentSeparator

Boop/Boop/scripts/lib/js-yaml.js:1404–1426  ·  view source on GitHub ↗
(state)

Source from the content-addressed store, hash-verified

1402}
1403
1404function testDocumentSeparator(state) {
1405 var _position = state.position,
1406 ch;
1407
1408 ch = state.input.charCodeAt(_position);
1409
1410 // Condition state.position === state.lineStart is tested
1411 // in parent on each call, for efficiency. No needs to test here again.
1412 if ((ch === 0x2D/* - */ || ch === 0x2E/* . */) &&
1413 ch === state.input.charCodeAt(_position + 1) &&
1414 ch === state.input.charCodeAt(_position + 2)) {
1415
1416 _position += 3;
1417
1418 ch = state.input.charCodeAt(_position);
1419
1420 if (ch === 0 || is_WS_OR_EOL(ch)) {
1421 return true;
1422 }
1423 }
1424
1425 return false;
1426}
1427
1428function writeFoldedLines(state, count) {
1429 if (count === 1) {

Callers 4

readPlainScalarFunction · 0.85
readSingleQuotedScalarFunction · 0.85
readDoubleQuotedScalarFunction · 0.85
readDocumentFunction · 0.85

Calls 1

is_WS_OR_EOLFunction · 0.85

Tested by

no test coverage detected