mirror of
https://github.com/garrytan/gstack.git
synced 2026-06-11 04:17:48 +02:00
Merge branch 'pr-499' into garrytan/merge-open-prs
This commit is contained in:
@@ -137,7 +137,11 @@ export async function handleMetaCommand(
|
||||
|
||||
// Separate target (selector/@ref) from output path
|
||||
for (const arg of remaining) {
|
||||
if (arg.startsWith('@e') || arg.startsWith('@c') || arg.startsWith('.') || arg.startsWith('#') || arg.includes('[')) {
|
||||
// File paths containing / and ending with an image/pdf extension are never CSS selectors
|
||||
const isFilePath = arg.includes('/') && /\.(png|jpe?g|webp|pdf)$/i.test(arg);
|
||||
if (isFilePath) {
|
||||
outputPath = arg;
|
||||
} else if (arg.startsWith('@e') || arg.startsWith('@c') || arg.startsWith('.') || arg.startsWith('#') || arg.includes('[')) {
|
||||
targetSelector = arg;
|
||||
} else {
|
||||
outputPath = arg;
|
||||
|
||||
Reference in New Issue
Block a user