|
8 | 8 |
|
9 | 9 | public interface JavaDocNodeRendererContext {
|
10 | 10 |
|
11 |
| - /** |
12 |
| - * @param url to be encoded |
13 |
| - * @return an encoded URL (depending on the configuration) |
14 |
| - */ |
15 |
| - String encodeUrl(String url); |
16 |
| - |
17 |
| - /** |
18 |
| - * Let extensions modify the HTML tag attributes. |
19 |
| - * |
20 |
| - * @param node the node for which the attributes are applied |
21 |
| - * @param tagName the HTML tag name that these attributes are for (e.g. {@code h1}, {@code pre}, {@code code}). |
22 |
| - * @param attributes the attributes that were calculated by the renderer |
23 |
| - * @return the extended attributes with added/updated/removed entries |
24 |
| - */ |
25 |
| - Map<String, String> extendAttributes(Node node, String tagName, Map<String, String> attributes); |
26 |
| - |
27 |
| - /** |
28 |
| - * @return the HTML writer to use |
29 |
| - */ |
30 |
| - JavaDocWriter getWriter(); |
31 |
| - |
32 |
| - /** |
33 |
| - * @return HTML that should be rendered for a soft line break |
34 |
| - */ |
35 |
| - String getSoftbreak(); |
36 |
| - |
37 |
| - /** |
38 |
| - * Render the specified node and its children using the configured renderers. This should be used to render child |
39 |
| - * nodes; be careful not to pass the node that is being rendered, that would result in an endless loop. |
40 |
| - * |
41 |
| - * @param node the node to render |
42 |
| - */ |
43 |
| - void render(Node node); |
44 |
| - |
45 |
| - /** |
46 |
| - * @return whether HTML blocks and tags should be escaped or not |
47 |
| - */ |
48 |
| - boolean shouldEscapeHtml(); |
49 |
| - |
50 |
| - /** |
51 |
| - * @return true if the {@link UrlSanitizer} should be used. |
52 |
| - * @since 0.14.0 |
53 |
| - */ |
54 |
| - boolean shouldSanitizeUrls(); |
55 |
| - |
56 |
| - /** |
57 |
| - * @return Sanitizer to use for securing {@link Link} href and {@link Image} src if {@link #shouldSanitizeUrls()} is |
58 |
| - * true. |
59 |
| - * @since 0.14.0 |
60 |
| - */ |
61 |
| - UrlSanitizer urlSanitizer(); |
| 11 | + /** |
| 12 | + * @param url to be encoded |
| 13 | + * @return an encoded URL (depending on the configuration) |
| 14 | + */ |
| 15 | + String encodeUrl(String url); |
| 16 | + |
| 17 | + /** |
| 18 | + * Let extensions modify the HTML tag attributes. |
| 19 | + * |
| 20 | + * @param node the node for which the attributes are applied |
| 21 | + * @param tagName the HTML tag name that these attributes are for (e.g. {@code h1}, {@code pre}, {@code code}). |
| 22 | + * @param attributes the attributes that were calculated by the renderer |
| 23 | + * @return the extended attributes with added/updated/removed entries |
| 24 | + */ |
| 25 | + Map<String, String> extendAttributes(Node node, String tagName, Map<String, String> attributes); |
| 26 | + |
| 27 | + /** |
| 28 | + * @return the HTML writer to use |
| 29 | + */ |
| 30 | + JavaDocWriter getWriter(); |
| 31 | + |
| 32 | + /** |
| 33 | + * @return HTML that should be rendered for a soft line break |
| 34 | + */ |
| 35 | + String getSoftbreak(); |
| 36 | + |
| 37 | + /** |
| 38 | + * Render the specified node and its children using the configured renderers. This should be used to render child |
| 39 | + * nodes; be careful not to pass the node that is being rendered, that would result in an endless loop. |
| 40 | + * |
| 41 | + * @param node the node to render |
| 42 | + */ |
| 43 | + void render(Node node); |
| 44 | + |
| 45 | + /** |
| 46 | + * @return whether HTML blocks and tags should be escaped or not |
| 47 | + */ |
| 48 | + boolean shouldEscapeHtml(); |
| 49 | + |
| 50 | + /** |
| 51 | + * @return true if the {@link UrlSanitizer} should be used. |
| 52 | + * @since 0.14.0 |
| 53 | + */ |
| 54 | + boolean shouldSanitizeUrls(); |
| 55 | + |
| 56 | + /** |
| 57 | + * @return Sanitizer to use for securing {@link Link} href and {@link Image} src if {@link #shouldSanitizeUrls()} is |
| 58 | + * true. |
| 59 | + * @since 0.14.0 |
| 60 | + */ |
| 61 | + UrlSanitizer urlSanitizer(); |
62 | 62 | }
|
0 commit comments