Skip to content

Commit

Permalink
update samples
Browse files Browse the repository at this point in the history
  • Loading branch information
vsch committed Apr 23, 2020
1 parent 56da52e commit 627a24e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@

import java.util.*;

/**
* This sample uses the parsed document to compute the embedded content.
*
* This means that the main document is parsed twice.
*
* For a sample which can compute the embedded content without needing to examine
* the main document AST and therefore, computes the content map before parsing
* the main document, see: {@link JekyllIncludeFileSample2}
*/
public class JekyllIncludeFileSample {
static String commonMark(String markdown, Map<String, String> included) {
MutableDataHolder options = new MutableDataSet();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@
import java.util.HashMap;
import java.util.Map;

/**
* This sample computes the html content map without examining the main document AST.
*
* This means that the main document is parsed once.
*
* For a sample which needs to examine the document AST include tags to compute
* the embedded content map, which results in the main document being parsed twice,
* see: {@link JekyllIncludeFileSample}
*/
public class JekyllIncludeFileSample2 {
static String commonMark(String markdown, Map<String, String> included) {
MutableDataHolder options = new MutableDataSet();
Expand Down

0 comments on commit 627a24e

Please sign in to comment.