mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-11 06:04:55 +08:00
DISABLE_THIRD_PARTY_CHECK=NPM update R=jacktfranklin@chromium.org Bug: none Change-Id: I41b7006f336b9465677cc7434abd70a732c58221 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2692907 Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org> Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
22 lines
586 B
JavaScript
22 lines
586 B
JavaScript
'use strict'
|
|
|
|
var codes = require('../character/codes.js')
|
|
var markdownLineEnding = require('../character/markdown-line-ending.js')
|
|
var types = require('../constant/types.js')
|
|
var factorySpace = require('./factory-space.js')
|
|
|
|
var partialBlankLine = {
|
|
tokenize: tokenizePartialBlankLine,
|
|
partial: true
|
|
}
|
|
|
|
function tokenizePartialBlankLine(effects, ok, nok) {
|
|
return factorySpace(effects, afterWhitespace, types.linePrefix)
|
|
|
|
function afterWhitespace(code) {
|
|
return code === codes.eof || markdownLineEnding(code) ? ok(code) : nok(code)
|
|
}
|
|
}
|
|
|
|
module.exports = partialBlankLine
|