Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to customize macro delimiters in TemplateProcessor #2261

Merged
merged 1 commit into from
Dec 23, 2022

Conversation

ismail1432
Copy link
Contributor

@ismail1432 ismail1432 commented Jul 15, 2022

Description

Hello 👋

Congratulations on this huge project 🔥

I'm glad to open a pull request with new additions where the goal is to allow developers to customize macros delimiters with 3 methods:

  • setMacroOpeningChars
  • setMacroClosingChars
  • setMacroChars

You can see #2251 for more details.

💡 I ran composer run-script check --timeout=0 and got an output that is not related to the PR: CamelCasePropertyName The property $TOCStyle is not named in camelCase.

✅ I duplicated all tests related to the TemplateProcessor with the customization of macros and it works like a charm.

I let you check the PR let me know if something is wrong or if you need more information.

Checklist:

  • I have run composer run-script check --timeout=0 and no errors were reported
  • The new code is covered by unit tests (check build/coverage for coverage report)
  • I have updated the documentation to describe the changes
  • Add more tests

@ismail1432 ismail1432 changed the title Allow to customize macro in TemplateProcessor Allow to customize macro delimiters in TemplateProcessor Jul 15, 2022
@ismail1432 ismail1432 changed the title Allow to customize macro delimiters in TemplateProcessor [WIP] Allow to customize macro delimiters in TemplateProcessor Jul 18, 2022
@ismail1432 ismail1432 force-pushed the customize-macro branch 4 times, most recently from 4819f2b to 7fb6f50 Compare September 12, 2022 14:45
@ismail1432 ismail1432 changed the title [WIP] Allow to customize macro delimiters in TemplateProcessor Allow to customize macro delimiters in TemplateProcessor Sep 12, 2022
@ismail1432 ismail1432 force-pushed the customize-macro branch 2 times, most recently from 8f0e81e to 17f9692 Compare September 21, 2022 14:28
@ismail1432
Copy link
Contributor Author

💡 The code does not pass the CI checks, I will take a look to fix this

@ismail1432 ismail1432 force-pushed the customize-macro branch 4 times, most recently from c4b226b to 53c0700 Compare September 30, 2022 10:43
@ismail1432
Copy link
Contributor Author

Friendly ping 👋

@PowerKiKi PowerKiKi changed the base branch from develop to master November 16, 2022 21:08
@ismail1432
Copy link
Contributor Author

Sorry, any update on the ability to merge it?

@benconda
Copy link

@Progi1984 🙏 ❤️

@glaszig
Copy link

glaszig commented Dec 21, 2022

lgtm! succesfully using it in production.

@Progi1984 Progi1984 merged commit b453cf0 into PHPOffice:master Dec 23, 2022
@Progi1984
Copy link
Member

Thanks @ismail1432

@ismail1432
Copy link
Contributor Author

lgtm! succesfully using it in production.

We use this in production since 8 months 👌

Thanks for merging for this awesome library 🔥

@Progi1984
Copy link
Member

Thanks @ismail1432 & @benconda for the contribution. Sorry for the time.

@JonnyS02
Copy link

Sadly, the 3 methods don't seem to work anymore.

When I try using
$templateProcessor = new TemplateProcessorMod($templateFile);
$templateProcessor->setMacroChars('<<','>>');

it just doesn't recognize <>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

5 participants