mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-18 06:44:46 -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)
|
* [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
|
## More Apple Silicon Lists
|
||||||
* [Is Apple silicon ready?](https://isapplesiliconready.com/) - Great list with detailed app status
|
* [Is Apple silicon ready?](https://isapplesiliconready.com/) - Great list with detailed app status
|
||||||
|
|
|
||||||
|
|
@ -62,13 +62,24 @@ export default async function () {
|
||||||
// Parse markdown
|
// Parse markdown
|
||||||
const result = md.parse(readmeContent)
|
const result = md.parse(readmeContent)
|
||||||
|
|
||||||
// .map(token => {
|
|
||||||
|
|
||||||
// })
|
|
||||||
|
|
||||||
// console.log('results', result.length)
|
// console.log('results', result.length)
|
||||||
// console.log('results', result)
|
// 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 = []
|
const appList = []
|
||||||
|
|
||||||
let sectionSlug = 'start'
|
let sectionSlug = 'start'
|
||||||
|
|
@ -76,7 +87,7 @@ export default async function () {
|
||||||
let isHeading = false
|
let isHeading = false
|
||||||
let isParagraph = false
|
let isParagraph = false
|
||||||
|
|
||||||
for (const token of result) {
|
for (const token of appListTokens) {
|
||||||
// On heading close switch off heading mode
|
// On heading close switch off heading mode
|
||||||
if (token.type.includes('heading_')) isHeading = !isHeading
|
if (token.type.includes('heading_')) isHeading = !isHeading
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue