#include <iostream>
#include "uCalc.h"

using namespace std;
using namespace uCalcSoftware;

int main() {
   uCalc uc;
   auto t = uc.NewTransformer();
   // Disable statement sensitivity to handle multi-line content
   t.DefaultRuleSet().StatementSensitive(false);

   auto htmlContent =
   R"(
<nav>
  <li><a href="#intro">Intro</a></li>
  <!-- <li><a href="#contact">Contact</a></li> -->
  <li><a href="#about">About</a></li>
</nav>
)";
   t.Text(htmlContent);

   // A rule to find all list items
   t.Pattern("<li>{item}</li>");

   // A rule to skip over HTML comments
   t.SkipOver("<!-- {comment} -->");

   t.Find();
   cout << "--- Found List Items ---" << endl;
   cout << t.Matches().Text() << endl;
}