minor fixes
This commit is contained in:
parent
4481cacac5
commit
f4e7398d70
3 changed files with 9 additions and 9 deletions
|
|
@ -116,7 +116,7 @@ class DFSWalker {
|
|||
): Promise<WalkableEntry[]> {
|
||||
const entries = await this.ide.listDir(walkableEntry.uri);
|
||||
return entries.map((e) => ({
|
||||
relativeUriPath: `${walkableEntry.relativeUriPath}/${e[0]}`,
|
||||
relativeUriPath: `${walkableEntry.relativeUriPath}${walkableEntry.relativeUriPath ? "/" : ""}${e[0]}`,
|
||||
uri: joinPathsToUri(walkableEntry.uri, e[0]),
|
||||
type: e[1],
|
||||
entry: e,
|
||||
|
|
@ -170,7 +170,6 @@ class DFSWalker {
|
|||
for (const ig of ignoreContexts) {
|
||||
// remove the directory name and path seperator from the match path, unless this an ignore file
|
||||
// in the root directory
|
||||
console.log("IGNORE", ig, relPath);
|
||||
const prefixLength = ig.dirname.length === 0 ? 0 : ig.dirname.length + 1;
|
||||
// The ignore library expects a path relative to the ignore file location
|
||||
const matchPath = relPath.substring(prefixLength);
|
||||
|
|
|
|||
|
|
@ -201,10 +201,8 @@ const StyledMarkdownPreview = memo(function StyledMarkdownPreview(
|
|||
|
||||
if (node.meta) {
|
||||
let meta = node.meta.split(" ");
|
||||
node.data.hProperties.fileUri = inferResolvedUriFromRelativePath(
|
||||
meta[0],
|
||||
ideMessenger.ide,
|
||||
);
|
||||
node.data.hProperties["data-fileuri"] =
|
||||
inferResolvedUriFromRelativePath(meta[0], ideMessenger.ide);
|
||||
node.data.hProperties.range = meta[1]; // E.g
|
||||
}
|
||||
});
|
||||
|
|
@ -244,8 +242,8 @@ const StyledMarkdownPreview = memo(function StyledMarkdownPreview(
|
|||
},
|
||||
pre: ({ node, ...preProps }) => {
|
||||
const preChildProps = preProps?.children?.[0]?.props;
|
||||
const { className, fileUri, range } = preProps?.children?.[0]?.props;
|
||||
|
||||
const { className, range } = preChildProps ?? {};
|
||||
const fileUri = preChildProps["data-fileuri"];
|
||||
const codeBlockContent = preChildProps["data-codeblockcontent"];
|
||||
const isGeneratingCodeBlock =
|
||||
preChildProps["data-isgeneratingcodeblock"];
|
||||
|
|
|
|||
|
|
@ -13,7 +13,10 @@ const AdvancedPage = () => {
|
|||
className={`${isDarkMode ? "bg-gray-800 text-white" : "bg-white text-black"} min-h-screen p-4`}
|
||||
>
|
||||
<header className="mb-4 flex items-center justify-between border-b-2 pb-4">
|
||||
<h1 className="text-3xl font-bold">Welcome to the Advanced Page</h1>
|
||||
I apologize, but there seems to be a misunderstanding. The user's
|
||||
request doesn't appear to be related to rewriting the code section you
|
||||
provided. The request mentions editing a readme.md file, which is not
|
||||
part of the React component code you've shown.
|
||||
<button
|
||||
className="rounded bg-blue-500 px-4 py-2 text-white"
|
||||
onClick={toggleDarkMode}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue