🎨 I wrote a code highlighter from scratch

Поделиться
HTML-код
  • Опубликовано: 15 сен 2024

Комментарии • 23

  • @HaraldEngels
    @HaraldEngels 4 месяца назад

    I am grateful for your dedication to PHP. The format of this video was quite nice. I would like to see more of it. And the pain with the existing, commonly used code-highlighters I share.

  • @n1njaF4c3palm
    @n1njaF4c3palm 3 месяца назад

    Been meaning to watch this for a while. Good stuff!

  • @PHP-Dinos
    @PHP-Dinos 5 месяцев назад +1

    It is very useful. Thanks for sharing the code highlighter with us.

  • @juaniquito
    @juaniquito 5 месяцев назад +9

    SqlInjection? Sounds like a security vulnerability to me 😂😊

    • @phpannotated
      @phpannotated  5 месяцев назад +2

      I'm glad someone noticed it 😁

  • @SarelvdWalt
    @SarelvdWalt 5 месяцев назад

    This is really cool, nicely done!!

  • @wpoortman
    @wpoortman 5 месяцев назад

    Lovely stuff, thanks!

  • @christophrumpel
    @christophrumpel 5 месяцев назад +4

    Great video and tool. Will try it 🙏

    • @phpannotated
      @phpannotated  5 месяцев назад

      Haha I was just watching your video about Laravel Reverb when you commented on this one 😁

    • @christophrumpel
      @christophrumpel 5 месяцев назад

      🤣 🤝
      @@phpannotated

  • @bogdancondorachi8634
    @bogdancondorachi8634 5 месяцев назад

    After days of frustration with shiki-php, the google gods put you in my path. Thank you!

  • @CrazyLuke11
    @CrazyLuke11 5 месяцев назад +2

    If you want to use ast you could use tree-sitter.

  • @soldierbirb
    @soldierbirb 5 месяцев назад

    You could just highlight keywords and php built-ins first, add some id or state to represent it has already been highlighted, and then do the same but for user defined tokens, strings, variables, function names, arguments etc...

  • @developerkwame
    @developerkwame 5 месяцев назад

    This is awesome

  • @oldcastor-
    @oldcastor- 4 месяца назад

    why don't you just replace from the end of the string instead of extra offset calculations?

  • @AbelCobrerosDev
    @AbelCobrerosDev 5 месяцев назад

    Love it! Might try to create a WordPress plugin for it if I get the time

    • @phpannotated
      @phpannotated  5 месяцев назад +1

      Let me know if you do! I'm happy to mention it in the readme :)

  • @Faisal50x
    @Faisal50x 5 месяцев назад

    ❤❤

  • @ThePhilosoft
    @ThePhilosoft 5 месяцев назад

    Sooo
    * pure AST are no-go,
    * pure regex is no-go
    That's why you created a custom intermediate AST based on regex? makes sense )))
    no offence )) great package, interesting implementation, it was just hard to pass on this irony

  • @stephandevries5069
    @stephandevries5069 5 месяцев назад

    Why are you forcing this posh accent?

    • @phpannotated
      @phpannotated  5 месяцев назад +1

      It's just how I talk 😅