toddself / dr-sax

An HTML to markdown converter that uses a sax based parser (htmlparser2)
http://toddself.github.io/presentations/dr-sax/demo
MIT License
16 stars 1 forks source link

meaningful whitespace is removed during conversion #19

Closed toddself closed 10 years ago

toddself commented 10 years ago

The <b> tag in the first part of the <p> element should keep it's trailing white space at the least.

<p><li> <b><a href="http://venissa.it" target="_blank">VENISSA</a></b> This destination restaurant on the little-known island of Mazzorbo in the Venetian lagoon has its own nineteenth-century walled vineyard, sustainable fruit and vegetable orchards, and a star female chef, Paola Budel, at the helm. The menu changes every three or four days, but highlights include the local delicacy, Alpago, a rare breed of lamb that Budel orders from a farm that specializes in raising them, or spider crab, one of the seafood stars straight from the lagoon (3 Fondamenta Santa Caterina; 39-041-527-2281).<br></br>
</p>

<p><li> <b><a target="_blank" href="http://antichecarampane.com">ANTICHE CARAMPANE</a></b> Even after a number of visits, one gets lost looking for this restaurant, which may explain why it remains an insider’s gem even though it’s just a short stroll from the Rialto. Once you find it, though, you feel like you are part of a small, bustling club of fellow unpretentious foodies. Standouts include fried soft-shell crab with delicious fried eggplant sliversseasonal vegetables and daily fish specials like John Dory or simply grilled <i>branzino</i> (1911 San Polo; 39-041-524-0165).<br></br>
</p>

<p><li> <b><a href="http://www.osterialletestiere.it/">ALLE TESTIERE</a></b> As soon as you’ve booked your trip to Venice, pick up the phone and reserve your meal here; it’s practically impossible to get one of the nine tables, especially during the Biennale or Venice Film Festival. The big attraction? Quite simply, the best food in town. Local and seasonal dishes are crafted with an attention to ingredients often forgotten in a city with so many tourists: The peas in the ricotta and arugula ravioli, for example, come from the island of Sant’Erasmo, and the fish choices come with a guide to what’s best in what month (Calle del Mondo Novo, Castello; 39-041-522-7220).<br></br>
</p>

<p><li> <b>CANTINA DO MORI</b> <i>Cicchetti</i> are Venice’s answer to tapas, and the city has dozens of bars devoted to them. This old-school spot is arguably the most atmospheric of the lot, with its dark wood walls, old wine barrels, and vintage photos. Share one of the low benches with local fishermen and try one of 200 vintages on offer, while you nibble on little snacks like <i>polpette</i> stuffed with baccalà and sardines with caramelized onion bruschetta (429 San Polo; 39-041-522-5401).<br></br>
</p>

<p><li> <b><a href="http://prontopesce.it" target="_blank">PRONTO PESCE</a></b> A relatively new arrival on the dining scene, this tiny storefront by the Rialto has excellent seafood right from the market. Grab one of the bar stools outside and try daily specials like razor clams with ginger and mint, baby octopus stewed in Modena vinegar, and a tart of creamed cod with ginger and celery, washed down with a glass of crisp white Brigaldara Garda (319 San Polo; 39-041-822-0298).<br></br>
</p>

<p><span class="page-footer"><br></br>
Image Courtesy of Alle Testiere</span><br></br>
</p>

Outputs:

1. **[VENISSA](http://venissa.it)**This destination restaurant on the little-known island of Mazzorbo in the Venetian lagoon has its own nineteenth-century walled vineyard, sustainable fruit and vegetable orchards, and a star female chef, Paola Budel, at the helm. The menu changes every three or four days, but highlights include the local delicacy, Alpago, a rare breed of lamb that Budel orders from a farm that specializes in raising them, or spider crab, one of the seafood stars straight from the lagoon (3 Fondamenta Santa Caterina; 39-041-527-2281).

1. **[ANTICHE CARAMPANE](http://antichecarampane.com)**Even after a number of visits, one gets lost looking for this restaurant, which may explain why it remains an insider’s gem even though it’s just a short stroll from the Rialto. Once you find it, though, you feel like you are part of a small, bustling club of fellow unpretentious foodies. Standouts include fried soft-shell crab with delicious fried eggplant sliversseasonal vegetables and daily fish specials like John Dory or simply grilled_branzino_(1911 San Polo; 39-041-524-0165).

1. **[ALLE TESTIERE](http://www.osterialletestiere.it/)**As soon as you’ve booked your trip to Venice, pick up the phone and reserve your meal here; it’s practically impossible to get one of the nine tables, especially during the Biennale or Venice Film Festival. The big attraction? Quite simply, the best food in town. Local and seasonal dishes are crafted with an attention to ingredients often forgotten in a city with so many tourists: The peas in the ricotta and arugula ravioli, for example, come from the island of Sant’Erasmo, and the fish choices come with a guide to what’s best in what month (Calle del Mondo Novo, Castello; 39-041-522-7220).

1. **CANTINA DO MORI**_Cicchetti_are Venice’s answer to tapas, and the city has dozens of bars devoted to them. This old-school spot is arguably the most atmospheric of the lot, with its dark wood walls, old wine barrels, and vintage photos. Share one of the low benches with local fishermen and try one of 200 vintages on offer, while you nibble on little snacks like_polpette_stuffed with baccalà and sardines with caramelized onion bruschetta (429 San Polo; 39-041-522-5401).

1. **[PRONTO PESCE](http://prontopesce.it)**A relatively new arrival on the dining scene, this tiny storefront by the Rialto has excellent seafood right from the market. Grab one of the bar stools outside and try daily specials like razor clams with ginger and mint, baby octopus stewed in Modena vinegar, and a tart of creamed cod with ginger and celery, washed down with a glass of crisp white Brigaldara Garda (319 San Polo; 39-041-822-0298).

Image Courtesy of Alle Testiere
toddself commented 10 years ago

This seems to happen only when the text is enclosed by an <li> tag:

<b>this is a test</b> of dr-sax and whitespace doesn't cause the error <li><b>this is a test</b> of dr-sax and whitespace</li> does