Skip to content

Detect template for variable and text concatenation #62

Description

@brainless

Create a mechanism to detect the template for any variable and text concatenation:

  • Check if text matches a simple template with a number and some words, like "42 comments", "16 hours ago", etc.
  • The variables to be replaced should be either numbers or floats
  • The allowed words should follow simple rules like "minutes", "hours"
  • Create exhaustive tests for such patterns
  • Check if we can create a template, like {count} comments, {count} hours ago from given content
  • For any given content that fits a template syntax, return the syntax

Implement template detection in HTML node tree and mark matched nodes with template

  • Create a CLI option --template to enable this stage separately
  • When --template mode is ON do the following
  • For each HTML node with content, check if we can find a template syntax for its content
  • Print the template syntax instead of actual value where matches are found wherever we are printing the HTML node tree

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions