Skip to content

Commit 627a24e

Browse files
committed
update samples
1 parent 56da52e commit 627a24e

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

flexmark-java-samples/src/com/vladsch/flexmark/java/samples/JekyllIncludeFileSample.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,15 @@
1111

1212
import java.util.*;
1313

14+
/**
15+
* This sample uses the parsed document to compute the embedded content.
16+
*
17+
* This means that the main document is parsed twice.
18+
*
19+
* For a sample which can compute the embedded content without needing to examine
20+
* the main document AST and therefore, computes the content map before parsing
21+
* the main document, see: {@link JekyllIncludeFileSample2}
22+
*/
1423
public class JekyllIncludeFileSample {
1524
static String commonMark(String markdown, Map<String, String> included) {
1625
MutableDataHolder options = new MutableDataSet();

flexmark-java-samples/src/com/vladsch/flexmark/java/samples/JekyllIncludeFileSample2.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,15 @@
1313
import java.util.HashMap;
1414
import java.util.Map;
1515

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

0 commit comments

Comments
 (0)