Skip to content

Source Alignment #2

@AlgoTrader

Description

@AlgoTrader

Source misalignment makes code very difficult to read. this.text starts at ident level but finishes at position 0 and rest of module is misaligned. There is online JS beautifier http://jsbeautifier.org/ although I prefer Eclipse formatting

  this.text = function(content) {
    content = strval(content);
    if (!tags && !comment && !pi && !cdata) return this;
    if (attributes && attribute) {
      ++texts;
      write(content.replace(/&/g, '&').replace(/"/g, '"'));
      return this;
    }
    else if(attributes && !attribute) {
      this.endAttributes();
    }
    ++texts;
    write(content.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;'));
  return this;
}

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