parseLint: use addName, add todos

This commit is contained in:
Jannis R 2019-06-21 18:43:10 +02:00
parent 707fd292d7
commit 1e0182f8f6
No known key found for this signature in database
GPG key ID: 0FE83946296A88A5
2 changed files with 9 additions and 1 deletions

View file

@ -5,6 +5,13 @@ const codesByIcon = Object.assign(Object.create(null), {
}) })
// todo: is passing in profile necessary? // todo: is passing in profile necessary?
// todo: pass in tag list from hint reference, e.g.:
// "tagL": [
// "RES_JNY_H3" // H3 = level 3 heading? shown on overview
// ]
// "tagL": [
// "RES_JNY_DTL" // only shown in journey detail
// ]
const parseHint = (profile, h, icons) => { const parseHint = (profile, h, icons) => {
// todo: C // todo: C
// todo: // todo:

View file

@ -12,7 +12,7 @@ const createParseLine = (profile, opt, {operators}) => {
const parseLine = (p) => { const parseLine = (p) => {
if (!p) return null // todo: handle this upstream if (!p) return null // todo: handle this upstream
const name = p.line || p.name || null const name = p.line || p.addName || p.name || null // wtf
const res = { const res = {
type: 'line', type: 'line',
// This is terrible, but FPTF demands an ID. Let's pray for HAFAS. // This is terrible, but FPTF demands an ID. Let's pray for HAFAS.
@ -21,6 +21,7 @@ const createParseLine = (profile, opt, {operators}) => {
|| name && slugg(name.trim()) || name && slugg(name.trim())
|| null || null
), ),
// todo: what is p.prodCtx.matchId? use as `id`? expose it.
fahrtNr: p.prodCtx && p.prodCtx.num || null, fahrtNr: p.prodCtx && p.prodCtx.num || null,
name, name,
public: true public: true