generateHtml method

String generateHtml(
  1. CodeSample sample
)

Generate the HTML using the skeleton file for the type of the given sample.

Returns a string with the HTML needed to embed in a web page for showing a sample on the web page.

Implementation

String generateHtml(CodeSample sample) {
  final String skeleton =
      _loadFileAsUtf8(configuration.getHtmlSkeletonFile(sample.type));
  return interpolateSkeleton(sample, skeleton);
}