MCPcopy Create free account
hub / github.com/marijnh/Eloquent-JavaScript / newText

Function newText

src/markdown.mjs:161–168  ·  view source on GitHub ↗
(state, silent)

Source from the content-addressed store, hash-verified

159let TERMINATOR_RE = /[\n!#$%&*+\-:<=>@\[\\\]^_`{}~]|\(\(/
160
161function newText(state, silent) {
162 let len = state.src.slice(state.pos, state.posMax).search(TERMINATOR_RE)
163 if (len == 0) return false
164 if (len == -1) len = state.posMax - state.pos
165 if (!silent) state.pending += state.src.slice(state.pos, state.pos + len)
166 state.pos += len
167 return true
168}
169
170function plugin(md) {
171 md.block.ruler.before("code", "meta", parseBlockMeta)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected