Skip to content

Releases: tempestphp/highlight

2.2.0

25 Apr 10:51
Compare
Choose a tag to compare

What's Changed

  • Highlighter :: added getter for supported languages by @atakde in #105

New Contributors

Full Changelog: 2.1.0...2.2.0

2.1.0

25 Apr 10:48
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 2.0.4...2.1.0

2.0.4

22 Apr 11:41
Compare
Choose a tag to compare

Full Changelog: 2.0.3...2.0.4

2.0.3

22 Apr 08:16
Compare
Choose a tag to compare

Full Changelog: 2.0.2...2.0.3

2.0.2

22 Apr 07:43
Compare
Choose a tag to compare

Full Changelog: 2.0.1...2.0.2

2.0.1

19 Apr 12:48
Compare
Choose a tag to compare

Full Changelog: 2.0.0...2.0.1

2.0.0

16 Apr 07:44
Compare
Choose a tag to compare
  • Language interface has two new methods: getName and getAliases
interface Language
{
+    public function getName(): string;
+    public function getAliases(): array;

    …
}
  • BaseLanguage is now abstract
  • Highlighter::setLanguage is renamed to Highlighter::addLanguage and its signature was changed:
- public function setLanguage(string $name, Language $language): self
+ public function addLanguage(Language $language): self
  • A new TextLanguagewas added
  • Rename WithPre to WebTheme
  • data-lang now also works for InlineTheme
- interface WithPre
+ interface WebTheme extends Theme
  • Changes to WebTheme method signatures:
- public function preBefore(): string;
- public function preAfter(): string;
+ public function preBefore(Highlighter $highlighter): string;
+ public function preAfter(Highlighter $highlighter): string;
  • Moved all CSS themes from src/Themes to src/Themes/Css
  • Injections can now only return ParsedInjection. If you happen to have custom injections that return strings, then those strings can simply be wrapped within a ParsedInjection: return new ParsedInjection($content).
interface Injection
{
-    public function parse(string $content, Highlighter $highlighter): string|ParsedInjection;
+    public function parse(string $content, Highlighter $highlighter): ParsedInjection;
}
  • Return type of Pattern::getTokenType() changed from TokenTypeEnum to TokenType
interface Pattern
{
-    public function getTokenType(): TokenTypeEnum;
+    public function getTokenType(): TokenType;
}

1.3.4

12 Apr 07:39
Compare
Choose a tag to compare

Full Changelog: 1.3.3...1.3.4

1.3.3

09 Apr 06:38
Compare
Choose a tag to compare
  • Fix bug with FQCN and ::class

1.3.2

09 Apr 06:24
Compare
Choose a tag to compare
  • Fix bug where two or more style tags within the same HTML file caused an error
  • Fix CSS media query bug
  • Fix missing CSS selector tokens bug