mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-15 06:35:20 -07:00
Move makeSlug to function
This commit is contained in:
parent
d1cb178be1
commit
00f1f1397c
5 changed files with 17 additions and 30 deletions
|
|
@ -1,7 +1,6 @@
|
|||
|
||||
import { promises as fs } from 'fs'
|
||||
import MarkdownIt from 'markdown-it'
|
||||
import slugify from 'slugify'
|
||||
import axios from 'axios'
|
||||
|
||||
import statuses, { getStatusName } from './statuses'
|
||||
|
|
@ -9,17 +8,11 @@ import appStoreGenres from './app-store/genres.js'
|
|||
import parseDate from './parse-date'
|
||||
import { eitherMatches } from './matching.js'
|
||||
import { getAppEndpoint } from './app-derived'
|
||||
import { makeSlug } from './slug.js'
|
||||
|
||||
|
||||
const md = new MarkdownIt()
|
||||
|
||||
|
||||
const makeSlug = name => slugify(name, {
|
||||
lower: true,
|
||||
strict: true
|
||||
})
|
||||
|
||||
|
||||
const getTokenLinks = function ( childTokens ) {
|
||||
|
||||
const tokenList = []
|
||||
|
|
@ -264,10 +257,7 @@ export default async function () {
|
|||
|
||||
if (isHeading && token.type === 'inline') {
|
||||
categoryTitle = token.content
|
||||
categorySlug = slugify(token.content, {
|
||||
lower: true,
|
||||
strict: true
|
||||
})
|
||||
categorySlug = makeSlug( token.content )
|
||||
|
||||
// appList[categorySlug] = []
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue