Skip to content

Commit 1d8eb51

Browse files
committed
fix path to be case-sensitiv
1 parent c94e55f commit 1d8eb51

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

src/components/markdown-it-plugins/markdown-it-plugin-include-examples.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ function escapeThings(str) {
4242
export const loadExample = (example_path, dir_content, part_name) => {
4343
// find all files belonging to one example folder.
4444
// return object with contents..
45-
console.group('loadExample')
46-
console.log('example_path', example_path)
47-
console.log('part_name', part_name)
45+
// console.group('loadExample')
46+
// console.log('example_path', example_path)
47+
// console.log('part_name', part_name)
4848
// https://github.com/Make-Your-School/part_name/tree/main/examples/Grove_125KHz_RFID_Reader_v1.0_minimal
4949
const part_url = `https://github.com/Make-Your-School/${part_name}`
5050
const example_url = `${part_url}/tree/main/examples/${path.basename(example_path)}`
@@ -92,7 +92,7 @@ export const loadExample = (example_path, dir_content, part_name) => {
9292
}
9393
// console.log('example_files:', example_files)
9494
// console.log('example_files:', Object.keys(example_files))
95-
console.groupEnd()
95+
// console.groupEnd()
9696
return example_files
9797
}
9898

src/content_md/mksContent.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,17 +95,17 @@ const mksGetItems = (mksContent, folderName, items_dir, items_dir_text) => {
9595
console.log('importedObj', importedObj)
9696
const { item_name } = path_regex.exec(path).groups
9797
// console.log(`item_name: '${item_name}'`);
98-
const item_name_lc = item_name.toLowerCase()
99-
mksItems[item_name_lc] = importSingleFile(
98+
// const item_name_lc = item_name.toLowerCase()
99+
mksItems[item_name] = importSingleFile(
100100
importedObj,
101101
`mks/${folderName}/${item_name}/`,
102102
path,
103103
item_name,
104104
)
105105
// TODO: find a better way to support text-search of rendered content.
106-
mksItems[item_name_lc].content_text = items_dir_text[path].default
106+
mksItems[item_name].content_text = items_dir_text[path].default
107107

108-
console.log(`${item_name} '${mksItems[item_name_lc].path_base}'`)
108+
console.log(`${item_name} '${mksItems[item_name].path_base}'`)
109109
}
110110
console.log('mksItems', mksItems)
111111
console.groupEnd()

src/pages/MKS_Part_Details.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ console.log('props.part_name', props.part_name)
4848
import { useMDContentStore } from 'src/stores/mdContent'
4949
const mdContent = useMDContentStore()
5050
console.log('mdContent', mdContent)
51-
const part = mdContent.mks.parts[props.part_name.toLowerCase()]
51+
const part = mdContent.mks.parts[props.part_name]
5252
console.log('part', part)
5353
5454
const mysLink = location.href

0 commit comments

Comments
 (0)