Skip to content

Discuss: Auto-detection discussion and it's difficulties #1213

@onury

Description

@onury

If js and yaml included both, js code is generally detected as yaml.
Examples below are all detected as yaml.

// Calculate distance between two points
var result = calcDistance({
    from: {
        x: 12,
        y: -5
    },
    to: {
        x: 4,
        y: 2
    }
});
// log(result);
var options = {
    opt1: 1,
    opt2: 2,
    opt3: 3
};
mylib.someFunc(options, function (err, result) {
    console.log(err || result);
});
// result:
[
  {
    from: "some name",
    to: "some other name",
    details: {
      prop1: 123,
      text: "some text"
    },
    prop: undefined,
    timestamp: 1456795956380
  }
]

Metadata

Metadata

Assignees

No one assigned

    Labels

    auto-detectIssue with auto detection of language typehelp welcomeCould use help from community

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions