Skip to content

Add REGEX_CLASS_ATTR_PARENS for class extraction - #1

Open
fiderosado wants to merge 1 commit into
inline0:mainfrom
fiderosado:patch-1
Open

Add REGEX_CLASS_ATTR_PARENS for class extraction#1
fiderosado wants to merge 1 commit into
inline0:mainfrom
fiderosado:patch-1

Conversation

@fiderosado

Copy link
Copy Markdown

Div::in("accion procesada")->class("p-4 bg-green-500 text-white")

I need to add this pattern so it can be recognized within methods of a class, and you need to extend the Tailwind::extractCandidates($content) method so that new patterns can be created from the configuration file to achieve something like this:

@import "tailwindcss";

@source "./app/**/*.php";

@patterns ["REGEX_CLASS_ATTR_PARENS"=>'/->class\s*(\s*"'["']\s*)/'];

Div::in("accion procesada")->class("p-4 bg-green-500 text-white")

I need to add this pattern so it can be recognized within methods of a class, and you need to extend the `Tailwind::extractCandidates($content)` method so that new patterns can be created from the configuration file to achieve something like this:

@import "tailwindcss";

@source "./app/**/*.php";

@patterns ["REGEX_CLASS_ATTR_PARENS"=>'/->class\s*\(\s*["\']([^"\']+)["\']\s*\)/'];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants