Soonad / moonad.org-old

Website for Moonad
http://provit.fm
MIT License
4 stars 0 forks source link

Fix normalize term case #18

Closed MaisaMilena closed 4 years ago

MaisaMilena commented 4 years ago

normalize function wasn't working. I started to fix it in Issue-15 and updating it to reduce but still not working.


Old code:

// Normalizes a definition
const normalize = (file: string, defs: fm.Defs, opts: fm.core.NormOpts) => {
  let norm : any;
  try {
    norm = fm.lang.show(fm.lang.norm(defs[file], defs, {}));
  } catch (e) {
    norm = "<unable_to_normalize>";
  }
  return norm;
}