(source:{type:string, info?:string, level?: number, listData?: {type:"ordered"|"bullet", start?: number}}, refocus = false)
| 1263 | } |
| 1264 | |
| 1265 | format(source:{type:string, info?:string, level?: number, listData?: {type:"ordered"|"bullet", start?: number}}, refocus = false) { |
| 1266 | let SpanClass:(typeof Span) = spanTypes[source.type] || spanTypes["default"]; |
| 1267 | |
| 1268 | let style = SpanClass.style(); |
| 1269 | if(style === "inline") { |
| 1270 | this.formatInline(source); |
| 1271 | |
| 1272 | } else if(style === "line") { |
| 1273 | this.formatLine(source); |
| 1274 | |
| 1275 | } else if(style === "block") { |
| 1276 | this.formatBlock(source); |
| 1277 | } |
| 1278 | |
| 1279 | if(refocus) this.cm.focus(); |
| 1280 | this.newBlockBar.active = false; |
| 1281 | |
| 1282 | this.queueUpdate(); |
| 1283 | } |
| 1284 | |
| 1285 | formatInline(source:{type:string}) { |
| 1286 | this.finalizeLastHistoryEntry(); |
no test coverage detected