In a large skillet heat the oil and stir in the onion. Cook for 2 minutes and stir in the garlic. Add the chopped Swiss chard and toss to coat. Pour in the wine or stock and stir to coat. When the chard begins to wilt, stir in the tomatoes, red pepper flakes and pine nuts. Bring to a simmer and stir in the reserved pasta cooking water. Remember: Do Not over cook the chard. It is ready to serve just after it has wilted. Immediately add the cooked pasta and toss to coat. Serve immediately.