Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docusaurus-plugin-moonwave/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -340,10 +340,11 @@ export default (context, options) => ({
if (nextDirMatch) {
const nextDir = nextDirMatch[1]

// convert kebab-case, camelCase, PascalCase to Title Case
// convert kebab-case, snake_case, camelCase, PascalCase to Title Case
const title = nextDir
.replace(/(?<!-)([A-Z])/g, " $1")
.replace("-", " ")
.replace("_", " ")
.split(/\s+/)
.filter((str) => str.length > 0)
.map(capitalize)
Expand Down
2 changes: 1 addition & 1 deletion website/docs/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ You can use the `autoSectionPath` option to automatically categorize classes int
autoSectionPath = "packages"
```

With this option set, folders inside `YOUR_REPO/packages` will be automatically used as section names. Folders may be `kebab-case`, `PascalCase`, `camelCase`, or `sentence case`: they are automatically converted to `Title Case` in the section name.
With this option set, folders inside `YOUR_REPO/packages` will be automatically used as section names. Folders may be `kebab-case`, `snake_case`, `PascalCase`, `camelCase`, or `sentence case`: they are automatically converted to `Title Case` in the section name.

For example, a class defined in `YOUR_REPO/packages/thing-doer/init.lua` will automatically be placed in a section called `Thing Doer`.

Expand Down