mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-15 06:35:20 -07:00
Fix other lists getting listed
This commit is contained in:
parent
30124c1ad4
commit
7ceabf3a42
2 changed files with 19 additions and 5 deletions
|
|
@ -179,6 +179,9 @@ Any comments, suggestions? [Let us know!](https://github.com/ThatGuySam/doesitar
|
|||
* [Zoom](https://zoom.us/download) - ✳️ Yes, runs via Rosetta 2 - [Discussion](https://github.com/ThatGuySam/doesitarm/issues/134)
|
||||
|
||||
|
||||
<!--- end-of-list -->
|
||||
|
||||
|
||||
|
||||
## More Apple Silicon Lists
|
||||
* [Is Apple silicon ready?](https://isapplesiliconready.com/) - Great list with detailed app status
|
||||
|
|
|
|||
|
|
@ -62,13 +62,24 @@ export default async function () {
|
|||
// Parse markdown
|
||||
const result = md.parse(readmeContent)
|
||||
|
||||
// .map(token => {
|
||||
|
||||
// })
|
||||
|
||||
// console.log('results', result.length)
|
||||
// console.log('results', result)
|
||||
|
||||
|
||||
// Finf the end of our list
|
||||
const endOfListIndex = result.findIndex((Token) => {
|
||||
// JSON.stringify(Token).includes('end-of-list')
|
||||
const matches = Token.content.includes('end-of-list')
|
||||
|
||||
if (matches) {
|
||||
console.log('Token', Token)
|
||||
}
|
||||
|
||||
return matches
|
||||
})
|
||||
|
||||
const appListTokens = result.slice(0, endOfListIndex)
|
||||
|
||||
const appList = []
|
||||
|
||||
let sectionSlug = 'start'
|
||||
|
|
@ -76,7 +87,7 @@ export default async function () {
|
|||
let isHeading = false
|
||||
let isParagraph = false
|
||||
|
||||
for (const token of result) {
|
||||
for (const token of appListTokens) {
|
||||
// On heading close switch off heading mode
|
||||
if (token.type.includes('heading_')) isHeading = !isHeading
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue