Skip to content

Limitations of custom delimiters #781

@rauschma

Description

@rauschma

Status quo

These are some of the current tokens:

  • <%
  • <%=
  • <%-
  • <%%
  • %>
  • -%>

We can specify:

  • delimiter
  • openDelimiter
  • closeDelimiter

Then % in the tokens is replaced with delimiter, < with openDelimiter and > with closeDelimiter.

I see two issues with that approach:

  • If delimiter is (e.g.) = or - then escaping doesn’t work. It also looks odd if delimiter is more than one character.
  • It limits the open and close delimiters we can specify. Recent use case I had:
    • Open with '/* ' (space after *)
    • Close with '*/' (no space)

Suggestion

Let us specify:

  • openDelimiter: the whole open delimiter
  • closeDelimiter: the whole close delimiter
  • escapedOpenDelimiter. Default: openDelimiter + '%'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions