Skip to content

Use HTML-like syntax instead of own custom one #96

@nazar-pc

Description

@nazar-pc

What I mean is to replace:

%ySomething yellow%n

with:

<y>Something yellow</y>

Benefits:

  • easier and more familiar to read, since there is no ySomething and similar things, at the end of the day we are all well trained to read HTML:)
  • IDE usually supports HTML within string literals, so it will be:
    • automatically highlighted
    • possible to fold blocks of text
    • working with autocomplete of closing such "tags"
    • working with spellchecking
    • so on...
  • there are numerous HTML parsers that can be used to pre/post-process such strings or strip HTML tags from string

I've implemented such approach in very basic form here: https://github.com/nazar-pc/phpt-tests-runner/blob/master/bin/phpt-tests-runner#L284
Even GitHub is capable to automatically highlight it in a basic form 😄

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions