Skip to content

[$!ENGLISH] conditional causing error #2

@BeepIsla

Description

@BeepIsla

Hey,

I am having issues parsing the English translation file for TF2. Specifically the problem seems to be that the parser only takes !$/$ for valid conditionals while apparently $! is also valid according to TF2.

Error:

VDF.parse: invalid syntax on line 10850:
[$!ENGLISH]

Way to reproduce the error:

const VDF = require("vdf-parser");
const got = require("got");

got("https://raw.githubusercontent.com/SteamDatabase/GameTracking-TF2/master/tf/resource/tf_english.txt", {
	resolveBodyOnly: true,
}).then(async (body) => {
	let json = VDF.parse(body);
	console.log(`Got ${Object.keys(json.lang.Tokens).length} translation tokens`);
}).catch((err) => {
	console.error(err);
});

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