github JohannesKaufmann/html-to-markdown v1.2.0

latest releases: v2.5.2, v2.5.1, v2.5.0...
6 years ago
  • The Table Plugin was improved and the TableCompat Plugin was added

  • Added After and Before hooks to the converter. To see how it is used, have a look at the Table Plugin.

func Table() md.Plugin {
	return func(c *md.Converter) []md.Rule {
		// the plugin (when added via Use) gets called with the converter and can use the methods on it.
		c.Before(func(selec *goquery.Selection) {
			// manipulate the dom to move all caption elements outside the table
		})

		// it returns the rules
		return []md.Rule{ ... }
	}
}

Don't miss a new html-to-markdown release

NewReleases is sending notifications on new releases.