Skip to content

Commit

Permalink
Rename autocomplete/html
Browse files Browse the repository at this point in the history
  • Loading branch information
FIameCaster committed Aug 1, 2024
1 parent eea432b commit 1f2eebd
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion package/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"./tooltips": "./dist/tooltips.js",
"./experimental_autocomplete": "./dist/extensions/autocomplete/index.js",
"./experimental_autocomplete/css": "./dist/extensions/autocomplete/css/index.js",
"./experimental_autocomplete/html": "./dist/extensions/autocomplete/html/index.js",
"./experimental_autocomplete/markup": "./dist/extensions/autocomplete/markup/index.js",
"./experimental_autocomplete/javascript": "./dist/extensions/autocomplete/javascript/index.js",
"./commands": "./dist/extensions/commands.js",
"./cursor": "./dist/extensions/cursor.js",
Expand Down
2 changes: 1 addition & 1 deletion package/scripts/buildHTMLData.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -174,4 +174,4 @@ data.valueSets.forEach(valueSet => {
lines.splice(4, 0, ...valueSets)
lines.push("}", "")

fs.writeFile("./src/extensions/autocomplete/html/data.ts", lines.join("\r\n"))
fs.writeFile("./src/extensions/autocomplete/markup/data.ts", lines.join("\r\n"))
2 changes: 1 addition & 1 deletion package/src/extensions/autocomplete/css/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { PrismEditor } from "../../../index.js"
import { getClosestToken } from "../../../utils/index.js"
import { Bracket } from "../../matchBrackets/index.js"
import { htmlTags } from "../html/index.js"
import { htmlTags } from "../markup/index.js"
import { Completion, CompletionContext, CompletionSource } from "../types.js"
import { atRules, cssValues, pseudoClasses, pseudoElements } from "./data.js"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import {
attrValueW,
attrValueXo,
attrValueY,
} from "../html/data.js"
} from "../markup/data.js"
import { AttributeConfig, TagConfig } from "../types.js"

const fetchPriority = ["high", "low", "auto"]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/** @module autocomplete/html */
/** @module autocomplete/markup */

import { getClosestToken } from "../../../utils/index.js"
import { AttributeConfig, Completion, CompletionSource, TagConfig } from "../types.js"
Expand All @@ -13,7 +13,7 @@ const tagPattern =
* @param globalAttributes Completable attributes shared by all tags.
* @returns A Completion source.
*/
const htmlCompletion = (tags: TagConfig, globalAttributes: AttributeConfig): CompletionSource => {
const markupCompletion = (tags: TagConfig, globalAttributes: AttributeConfig): CompletionSource => {
const tagOptions = optionsFromKeys(tags, "property")
const attrOptions = optionsFromKeys(globalAttributes, "enum")

Expand Down Expand Up @@ -58,4 +58,4 @@ const htmlCompletion = (tags: TagConfig, globalAttributes: AttributeConfig): Com

export { htmlTags, globalHtmlAttributes } from "./data.js"

export { htmlCompletion }
export { markupCompletion }
4 changes: 2 additions & 2 deletions package/src/testsite/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import {
jsContext,
jsxTagCompletion,
} from "../extensions/autocomplete/javascript"
import { htmlCompletion, htmlTags, globalHtmlAttributes } from "../extensions/autocomplete/html"
import { markupCompletion, htmlTags, globalHtmlAttributes } from "../extensions/autocomplete/markup"
import { fuzzyFilter } from "../extensions/autocomplete/filter"
import { cssCompletion } from "../extensions/autocomplete/css"
import { globalReactAttributes, reactTags } from "../extensions/autocomplete/javascript/reactData"
Expand Down Expand Up @@ -239,7 +239,7 @@ registerCompletions(["javascript", "js", "jsx", "tsx", "typescript", "ts"], {
})

registerCompletions(["html", "markup"], {
sources: [htmlCompletion(htmlTags, globalHtmlAttributes)],
sources: [markupCompletion(htmlTags, globalHtmlAttributes)],
})

registerCompletions(["css"], {
Expand Down
2 changes: 1 addition & 1 deletion package/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const entries = {
"extensions/folding/index": "src/extensions/folding/index.ts",
"extensions/autocomplete/index": "src/extensions/autocomplete/index.ts",
"extensions/autocomplete/css/index": "src/extensions/autocomplete/css/index.ts",
"extensions/autocomplete/html/index": "src/extensions/autocomplete/html/index.ts",
"extensions/autocomplete/markup/index": "src/extensions/autocomplete/markup/index.ts",
"extensions/autocomplete/javascript/index": "src/extensions/autocomplete/javascript/index.ts",
autocomplete: "src/extensions/autocomplete/style.css",
folding: "src/extensions/folding/folding.css",
Expand Down

0 comments on commit 1f2eebd

Please sign in to comment.