mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-18 06:44:46 -07:00
Add title character exceptions
This commit is contained in:
parent
4cbde7c8f5
commit
f1857d3077
1 changed files with 1 additions and 14 deletions
|
|
@ -9,7 +9,7 @@ require('dotenv').config()
|
|||
|
||||
// const md = new MarkdownIt()
|
||||
|
||||
const allowedTitleCharacters = new Set( 'ABCDEFGHIJKMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890 -.'.split('') )
|
||||
const allowedTitleCharacters = new Set( 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890 -_.®/\()音乐体验版'.split('') )
|
||||
|
||||
|
||||
function isString( maybeString ) {
|
||||
|
|
@ -19,9 +19,6 @@ function isString( maybeString ) {
|
|||
|
||||
test.before(async t => {
|
||||
const readmeFileContent = await fs.readFile('./README.md', 'utf-8')
|
||||
// const readmeMarkdown = md.parse( readmeFileContent )
|
||||
|
||||
// t.log( 'readmeMarkdown', readmeMarkdown )
|
||||
|
||||
|
||||
// Store sitemap urls to context
|
||||
|
|
@ -37,7 +34,6 @@ test('README App Titles are alphanumeric only', (t) => {
|
|||
commits: []
|
||||
})
|
||||
|
||||
|
||||
// console.log('readmeAppList', readmeAppList)
|
||||
t.log('readmeAppList', readmeAppList.length)
|
||||
|
||||
|
|
@ -45,10 +41,6 @@ test('README App Titles are alphanumeric only', (t) => {
|
|||
for (const readmeApp of readmeAppList) {
|
||||
const cleanedAppName = readmeApp.name//.toLowerCase()
|
||||
|
||||
// const firstInvisbleCharacterIndex = cleanedAppName.search( invisibleCharacerRegex )
|
||||
|
||||
// const standardSpaceCharCode = 32
|
||||
|
||||
for ( const character of cleanedAppName ) {
|
||||
if ( !allowedTitleCharacters.has( character ) ) {
|
||||
|
||||
|
|
@ -61,11 +53,6 @@ test('README App Titles are alphanumeric only', (t) => {
|
|||
}
|
||||
}
|
||||
|
||||
// if ( readmeApp.name.includes('Apple Trans') ) {
|
||||
// const normalNameLength = 'Apple Transporter'.length
|
||||
// t.log( 'normalNameLength', normalNameLength )
|
||||
// t.log( readmeApp.name, readmeApp.name.length )
|
||||
// }
|
||||
}
|
||||
|
||||
// const urlsWithDoubleSlashes = t.context.sitemapUrls.filter( url => url.pathname.includes('//') )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue