diff --git a/VERSION-TODO.md b/VERSION-TODO.md index bf2858448..7de597385 100644 --- a/VERSION-TODO.md +++ b/VERSION-TODO.md @@ -1612,6 +1612,7 @@ Please give feedback on the upcoming changes if you have concerns about breaking * `flexmark-ext-jekyll-tag/src/test/resources/com.vladsch.flexmark.ext.jekyll.tag.txt` * `flexmark-ext-macros/src/test/resources/com.vladsch.flexmark.ext.macros.txt` * `flexmark-ext-media-tags/src/test/resources/com.vladsch.flexmark.ext.media.tags.txt` + * `flexmark-ext-resizable-image/src/test/resources/com.vladsch.flexmark.ext.resizable.image.txt` * `flexmark-ext-spec-example/src/test/resources/com.vladsch.flexmark.ext.spec.example.txt` * `flexmark-ext-superscript/src/test/resources/com.vladsch.flexmark.ext.superscript.txt` * `flexmark-ext-tables/src/test/resources/com.vladsch.flexmark.ext.tables.txt` diff --git a/VERSION.md b/VERSION.md index bc91b3b40..dd9b71859 100644 --- a/VERSION.md +++ b/VERSION.md @@ -1208,6 +1208,7 @@ Please give feedback on the upcoming changes if you have concerns about breaking * `flexmark-ext-jekyll-tag/src/test/resources/com.vladsch.flexmark.ext.jekyll.tag.txt` * `flexmark-ext-macros/src/test/resources/com.vladsch.flexmark.ext.macros.txt` * `flexmark-ext-media-tags/src/test/resources/com.vladsch.flexmark.ext.media.tags.txt` + * `flexmark-ext-resizable-image/src/test/resources/com.vladsch.flexmark.ext.resizable.image.txt` * `flexmark-ext-spec-example/src/test/resources/com.vladsch.flexmark.ext.spec.example.txt` * `flexmark-ext-superscript/src/test/resources/com.vladsch.flexmark.ext.superscript.txt` * `flexmark-ext-tables/src/test/resources/com.vladsch.flexmark.ext.tables.txt` diff --git a/flexmark-all/flexmark-all.iml b/flexmark-all/flexmark-all.iml index 34522859b..444791f12 100644 --- a/flexmark-all/flexmark-all.iml +++ b/flexmark-all/flexmark-all.iml @@ -72,5 +72,6 @@ + diff --git a/flexmark-all/pom.xml b/flexmark-all/pom.xml index acb53f2ac..fb40bf882 100644 --- a/flexmark-all/pom.xml +++ b/flexmark-all/pom.xml @@ -118,6 +118,11 @@ flexmark-ext-media-tags ${project.version} + + com.vladsch.flexmark + flexmark-ext-resizable-image + ${project.version} + com.vladsch.flexmark flexmark-ext-macros diff --git a/flexmark-all/src/assembly/bin.xml b/flexmark-all/src/assembly/bin.xml index daf60f606..b9b9407af 100644 --- a/flexmark-all/src/assembly/bin.xml +++ b/flexmark-all/src/assembly/bin.xml @@ -33,6 +33,7 @@ com.vladsch.flexmark:flexmark-ext-ins com.vladsch.flexmark:flexmark-ext-macros com.vladsch.flexmark:flexmark-ext-media-tags + com.vladsch.flexmark:flexmark-ext-resizable-image com.vladsch.flexmark:flexmark-ext-xwiki-macros com.vladsch.flexmark:flexmark-ext-superscript com.vladsch.flexmark:flexmark-ext-tables diff --git a/flexmark-ext-resizable-image/flexmark-ext-resizable-image.iml b/flexmark-ext-resizable-image/flexmark-ext-resizable-image.iml new file mode 100644 index 000000000..16dcf289d --- /dev/null +++ b/flexmark-ext-resizable-image/flexmark-ext-resizable-image.iml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/flexmark-ext-resizable-image/pom.xml b/flexmark-ext-resizable-image/pom.xml new file mode 100644 index 000000000..eb2f3cfa3 --- /dev/null +++ b/flexmark-ext-resizable-image/pom.xml @@ -0,0 +1,30 @@ + + + 4.0.0 + + com.vladsch.flexmark + flexmark-java + 0.62.2 + + + flexmark-ext-resizable-image + flexmark-java extension for image's size + flexmark-java extension to set the size of the images + + , + + com.vladsch.flexmark + flexmark + + + com.vladsch.flexmark + flexmark-test-util + test + + + com.vladsch.flexmark + flexmark-core-test + test + + + diff --git a/flexmark-ext-resizable-image/src/main/java/com/vladsch/flexmark/ext/resizable-image/ResizableImage.java b/flexmark-ext-resizable-image/src/main/java/com/vladsch/flexmark/ext/resizable-image/ResizableImage.java new file mode 100644 index 000000000..c13fd5f66 --- /dev/null +++ b/flexmark-ext-resizable-image/src/main/java/com/vladsch/flexmark/ext/resizable-image/ResizableImage.java @@ -0,0 +1,43 @@ +package com.atlassian.plugins.confluence.markdown.ext.DevOpsResizableImage; + +import com.vladsch.flexmark.util.ast.DoNotDecorate; +import com.vladsch.flexmark.util.ast.Node; +import com.vladsch.flexmark.util.sequence.BasedSequence; +import org.jetbrains.annotations.NotNull; + +public class ResizableImage extends Node implements DoNotDecorate { + protected BasedSequence source = BasedSequence.NULL; + protected BasedSequence text = BasedSequence.NULL; + protected BasedSequence width = BasedSequence.NULL; + protected BasedSequence height = BasedSequence.NULL; + + @NotNull + @Override + public BasedSequence[] getSegments() { + return new BasedSequence[] { text, source, width, height }; + } + + public ResizableImage(BasedSequence text, BasedSequence source, BasedSequence width, BasedSequence height) { + super(spanningChars(text, source, width, height)); + this.source = source; + this.text = text; + this.width = width; + this.height = height; + } + + public BasedSequence getText() { + return text; + } + + public BasedSequence getSource() { + return source; + } + + public BasedSequence getWidth() { + return width; + } + + public BasedSequence getHeight() { + return height; + } +} diff --git a/flexmark-ext-resizable-image/src/main/java/com/vladsch/flexmark/ext/resizable-image/ResizableImageExtension.java b/flexmark-ext-resizable-image/src/main/java/com/vladsch/flexmark/ext/resizable-image/ResizableImageExtension.java new file mode 100644 index 000000000..11e88c6cf --- /dev/null +++ b/flexmark-ext-resizable-image/src/main/java/com/vladsch/flexmark/ext/resizable-image/ResizableImageExtension.java @@ -0,0 +1,43 @@ +package com.atlassian.plugins.confluence.markdown.ext.DevOpsResizableImage; + +import com.atlassian.plugins.confluence.markdown.ext.DevOpsResizableImage.internal.ResizableImageInlineParserExtension; +import com.atlassian.plugins.confluence.markdown.ext.DevOpsResizableImage.internal.ResizableImageNodeRenderer; +import com.vladsch.flexmark.html.HtmlRenderer; +import com.vladsch.flexmark.parser.Parser; +import com.vladsch.flexmark.util.data.MutableDataHolder; + +import org.jetbrains.annotations.NotNull; + +public class ResizableImageExtension implements Parser.ParserExtension, HtmlRenderer.HtmlRendererExtension { + + private ResizableImageExtension() { + } + + public static ResizableImageExtension create() { + return new ResizableImageExtension(); + } + + @Override + public void rendererOptions(@NotNull MutableDataHolder options) { + + } + + @Override + public void parserOptions(MutableDataHolder options) { + + } + + @Override + public void extend(Parser.Builder parserBuilder) { + parserBuilder.customInlineParserExtensionFactory(new ResizableImageInlineParserExtension.Factory()); + } + + @Override + public void extend(@NotNull HtmlRenderer.Builder htmlRendererBuilder, @NotNull String rendererType) { + if (htmlRendererBuilder.isRendererType("HTML")) { + htmlRendererBuilder.nodeRendererFactory(new ResizableImageNodeRenderer.Factory()); + } else if (htmlRendererBuilder.isRendererType("JIRA")) { + return; + } + } +} diff --git a/flexmark-ext-resizable-image/src/main/java/com/vladsch/flexmark/ext/resizable-image/ResizableImageVisitor.java b/flexmark-ext-resizable-image/src/main/java/com/vladsch/flexmark/ext/resizable-image/ResizableImageVisitor.java new file mode 100644 index 000000000..96326b326 --- /dev/null +++ b/flexmark-ext-resizable-image/src/main/java/com/vladsch/flexmark/ext/resizable-image/ResizableImageVisitor.java @@ -0,0 +1,5 @@ +package com.atlassian.plugins.confluence.markdown.ext.DevOpsResizableImage; + +public interface ResizableImageVisitor { + void visit(ResizableImage node); +} \ No newline at end of file diff --git a/flexmark-ext-resizable-image/src/main/java/com/vladsch/flexmark/ext/resizable-image/ResizableImageVisitorExt.java b/flexmark-ext-resizable-image/src/main/java/com/vladsch/flexmark/ext/resizable-image/ResizableImageVisitorExt.java new file mode 100644 index 000000000..4268f75c6 --- /dev/null +++ b/flexmark-ext-resizable-image/src/main/java/com/vladsch/flexmark/ext/resizable-image/ResizableImageVisitorExt.java @@ -0,0 +1,11 @@ +package com.atlassian.plugins.confluence.markdown.ext.DevOpsResizableImage; + +import com.vladsch.flexmark.util.ast.VisitHandler; + +public class ResizableImageVisitorExt { + public static VisitHandler[] VISIT_HANDLERS(V visitor) { + return new VisitHandler[] { + new VisitHandler<>(ResizableImage.class, visitor::visit), + }; + } +} diff --git a/flexmark-ext-resizable-image/src/main/java/com/vladsch/flexmark/ext/resizable-image/internal/ResizableImageInlineParserExtension.java b/flexmark-ext-resizable-image/src/main/java/com/vladsch/flexmark/ext/resizable-image/internal/ResizableImageInlineParserExtension.java new file mode 100644 index 000000000..43bee34de --- /dev/null +++ b/flexmark-ext-resizable-image/src/main/java/com/vladsch/flexmark/ext/resizable-image/internal/ResizableImageInlineParserExtension.java @@ -0,0 +1,82 @@ +package com.atlassian.plugins.confluence.markdown.ext.DevOpsResizableImage.internal; + +import com.atlassian.plugins.confluence.markdown.ext.DevOpsResizableImage.ResizableImage; +import com.vladsch.flexmark.parser.InlineParser; +import com.vladsch.flexmark.parser.InlineParserExtension; +import com.vladsch.flexmark.parser.InlineParserExtensionFactory; +import com.vladsch.flexmark.parser.LightInlineParser; +import com.vladsch.flexmark.util.sequence.BasedSequence; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +import java.util.Set; +import java.util.regex.Pattern; + +public class ResizableImageInlineParserExtension implements InlineParserExtension { + final public static Pattern IMAGE_PATTERN = Pattern.compile("\\!\\[(\\S*)\\]\\((\\S*)\\s*=*(\\d*)x*(\\d*)\\)", + Pattern.CASE_INSENSITIVE); + + public ResizableImageInlineParserExtension(LightInlineParser inlineParser) { + } + + @Override + public void finalizeDocument(@NotNull InlineParser inlineParser) { + } + + @Override + public void finalizeBlock(@NotNull InlineParser inlineParser) { + } + + @Override + public boolean parse(@NotNull LightInlineParser inlineParser) { + int index = inlineParser.getIndex(); + char c = inlineParser.getInput().charAt(index + 1); + if (c == '[') { + BasedSequence[] matches = inlineParser.matchWithGroups(IMAGE_PATTERN); + if (matches != null) { + inlineParser.flushTextNode(); + + BasedSequence text = matches[1]; + BasedSequence source = matches[2]; + BasedSequence width = matches[3]; + BasedSequence height = matches[4]; + + ResizableImage image = new ResizableImage(text, source, width, height); + inlineParser.getBlock().appendChild(image); + return true; + } + } + return false; + } + + public static class Factory implements InlineParserExtensionFactory { + @Nullable + @Override + public Set> getAfterDependents() { + return null; + } + + @NotNull + @Override + public CharSequence getCharacters() { + return "!"; + } + + @Nullable + @Override + public Set> getBeforeDependents() { + return null; + } + + @NotNull + @Override + public InlineParserExtension apply(@NotNull LightInlineParser lightInlineParser) { + return new ResizableImageInlineParserExtension(lightInlineParser); + } + + @Override + public boolean affectsGlobalScope() { + return false; + } + } +} diff --git a/flexmark-ext-resizable-image/src/main/java/com/vladsch/flexmark/ext/resizable-image/internal/ResizableImageNodeRenderer.java b/flexmark-ext-resizable-image/src/main/java/com/vladsch/flexmark/ext/resizable-image/internal/ResizableImageNodeRenderer.java new file mode 100644 index 000000000..1238c8aeb --- /dev/null +++ b/flexmark-ext-resizable-image/src/main/java/com/vladsch/flexmark/ext/resizable-image/internal/ResizableImageNodeRenderer.java @@ -0,0 +1,59 @@ +package com.atlassian.plugins.confluence.markdown.ext.DevOpsResizableImage.internal; + +import com.atlassian.plugins.confluence.markdown.ext.DevOpsResizableImage.ResizableImage; +import com.vladsch.flexmark.html.HtmlWriter; +import com.vladsch.flexmark.html.renderer.LinkType; +import com.vladsch.flexmark.html.renderer.NodeRenderer; +import com.vladsch.flexmark.html.renderer.NodeRendererContext; +import com.vladsch.flexmark.html.renderer.NodeRendererFactory; +import com.vladsch.flexmark.html.renderer.NodeRenderingHandler; +import com.vladsch.flexmark.html.renderer.ResolvedLink; +import com.vladsch.flexmark.util.data.DataHolder; +import org.jetbrains.annotations.NotNull; + +import java.util.HashSet; +import java.util.Set; + +public class ResizableImageNodeRenderer implements NodeRenderer +{ + public ResizableImageNodeRenderer(DataHolder options) { + } + + @Override + public Set> getNodeRenderingHandlers() { + Set> set = new HashSet<>(); + // @formatter:off + set.add(new NodeRenderingHandler<>(ResizableImage.class, ResizableImageNodeRenderer.this::render)); + // @formatter:on + return set; + } + + public void render(ResizableImage node, NodeRendererContext context, HtmlWriter html) { + if (context.isDoNotRenderLinks()) { + context.renderChildren(node); + } else { + ResolvedLink link = context.resolveLink(LinkType.IMAGE, node.getSource(), true); + html.srcPos(node.getChars()) + .attr("src", link.getUrl()); + if (node.getText().isNotEmpty()){ + html.attr("alt", node.getText()); + } + if (node.getWidth().isNotEmpty()){ + html.attr("width", node.getWidth() + "px"); + } + if (node.getHeight().isNotEmpty()){ + html.attr("height", node.getHeight() + "px"); + } + html.withAttr().tag("img"); + html.tag("/img"); + } + } + + public static class Factory implements NodeRendererFactory { + @NotNull + @Override + public NodeRenderer apply(@NotNull DataHolder options) { + return new ResizableImageNodeRenderer(options); + } + } +} diff --git a/flexmark-ext-resizable-image/src/main/javadoc/overview.html b/flexmark-ext-resizable-image/src/main/javadoc/overview.html new file mode 100644 index 000000000..c3d158745 --- /dev/null +++ b/flexmark-ext-resizable-image/src/main/javadoc/overview.html @@ -0,0 +1,11 @@ + + + + + +

flexmark-java extension enables to set width and height for images by stating them +as ![text](/src =WxH) which is used in Azure DevOps markdown.

+

Converts ![text](/src =WxH) into image with width = W and height = H. + Also added support for image`s relative paths from Azure DevOps repository.

+ + diff --git a/flexmark-ext-resizable-image/src/main/javadoc/overview.md b/flexmark-ext-resizable-image/src/main/javadoc/overview.md new file mode 100644 index 000000000..68543ec12 --- /dev/null +++ b/flexmark-ext-resizable-image/src/main/javadoc/overview.md @@ -0,0 +1,4 @@ +**flexmark-java extension enables to set width and height for images by stating them as ![text](/src =WxH) which is used in Azure DevOps markdown.** + +Converts ![text](/src =WxH) into image with width = W and height = H. +Also added support for image`s relative paths from Azure DevOps repository. \ No newline at end of file diff --git a/flexmark-ext-resizable-image/src/test/java/com/vladsch/flexmark/ext/resizable/image/ComboResizableImageSpecTest.java b/flexmark-ext-resizable-image/src/test/java/com/vladsch/flexmark/ext/resizable/image/ComboResizableImageSpecTest.java new file mode 100644 index 000000000..b0eec7830 --- /dev/null +++ b/flexmark-ext-resizable-image/src/test/java/com/vladsch/flexmark/ext/resizable/image/ComboResizableImageSpecTest.java @@ -0,0 +1,30 @@ +package com.vladsch.flexmark.ext.youtube.embedded; + +import com.vladsch.flexmark.core.test.util.RendererSpecTest; +import com.vladsch.flexmark.parser.Parser; +import com.vladsch.flexmark.test.util.spec.ResourceLocation; +import com.vladsch.flexmark.test.util.spec.SpecExample; +import com.vladsch.flexmark.util.data.DataHolder; +import com.vladsch.flexmark.util.data.MutableDataSet; +import org.jetbrains.annotations.NotNull; +import org.junit.runners.Parameterized; + +import java.util.Collections; +import java.util.List; + +public class ComboResizableImageSpecTest extends RendererSpecTest { + final private static String SPEC_RESOURCE = "/ext_resizable_image_spec.md"; + final public static @NotNull ResourceLocation RESOURCE_LOCATION = ResourceLocation.of(SPEC_RESOURCE); + final private static DataHolder OPTIONS = new MutableDataSet() + .set(Parser.EXTENSIONS, Collections.singleton(ResizableImageExtension.create())) + .toImmutable(); + + public ComboResizableImageSpecTest(@NotNull SpecExample example) { + super(example, null, OPTIONS); + } + + @Parameterized.Parameters(name = "{0}") + public static List data() { + return getTestData(RESOURCE_LOCATION); + } +} diff --git a/flexmark-ext-resizable-image/src/test/java/com/vladsch/flexmark/ext/resizable/image/ExtResizableImageTestSuite.java b/flexmark-ext-resizable-image/src/test/java/com/vladsch/flexmark/ext/resizable/image/ExtResizableImageTestSuite.java new file mode 100644 index 000000000..6c355ccd2 --- /dev/null +++ b/flexmark-ext-resizable-image/src/test/java/com/vladsch/flexmark/ext/resizable/image/ExtResizableImageTestSuite.java @@ -0,0 +1,11 @@ +package com.vladsch.flexmark.ext.resizable.image; + +import org.junit.runner.RunWith; +import org.junit.runners.Suite; + +@RunWith(Suite.class) +@Suite.SuiteClasses({ + ComboResizableImageSpecTest.class, +}) +public class ExtResizableImageTestSuite { +} diff --git a/flexmark-ext-resizable-image/src/test/resources/com.vladsch.flexmark.ext.resizable.image.txt b/flexmark-ext-resizable-image/src/test/resources/com.vladsch.flexmark.ext.resizable.image.txt new file mode 100644 index 000000000..34dbc4597 --- /dev/null +++ b/flexmark-ext-resizable-image/src/test/resources/com.vladsch.flexmark.ext.resizable.image.txt @@ -0,0 +1 @@ +java/ diff --git a/flexmark-ext-resizable-image/src/test/resources/ext_resizable_image_spec.md b/flexmark-ext-resizable-image/src/test/resources/ext_resizable_image_spec.md new file mode 100644 index 000000000..9d93f17a3 --- /dev/null +++ b/flexmark-ext-resizable-image/src/test/resources/ext_resizable_image_spec.md @@ -0,0 +1,277 @@ +# BASIC SYNTAX +--- + +# h1 Heading +## h2 Heading +### h3 Heading +#### h4 Heading +##### h5 Heading +###### h6 Heading + +Alternate syntax heading level 1 +=============== +Alternate syntax heading level 2 +--------------- + +## Paragraphs & Line Breaks + +I really like using Markdown. + +I think I'll use it to format all of my documents from now on. + +This is the first line with 2 spaces at the end. +And this is the second line. + + +## Horizontal Rules + +___ + +--- + +*** + + +## Emphasis + +**This is bold text** + +__This is bold text__ + +*This is italic text* + +_This is italic text_ + +This text is ***bold and italic*** + +This text is ___bold and italic___ + +This text is __*bold and italic*__ + +This text is **_bold and italic_**. + + +## Blockquotes + + +> Blockquotes can also be nested... +>> ...by using additional greater-than signs right next to each other... +> > > ...or with spaces between arrows. + +> #### Blockquotes can be used with other markdown elements +> +> - Revenue was off the chart. +> - Profits were higher than ever. +> +> *Everything* is going according to **plan**. + + +## Lists + +Unordered + ++ Create a list by starting a line with `+`, `-`, or `*` ++ Sub-lists are made by indenting 2 spaces: + - Marker character change forces new list start: + * Ac tristique libero volutpat at + + Facilisis in pretium nisl aliquet + - Nulla volutpat aliquam velit ++ Very easy! + +Ordered + +1. Lorem ipsum dolor sit amet +2. Consectetur adipiscing elit +3. Integer molestie lorem at massa + + +1. You can use sequential numbers... +1. ...or keep all the numbers as `1.` + +Start numbering with offset: + +57. foo +1. bar + + + +## Code + +Inline `code` + +Indented code + + // Some comments + line 1 of code + line 2 of code + line 3 of code + + +Block code "fences" + +``` +Sample text here... +``` + +Syntax highlighting + +``` js +var foo = function (bar) { + return bar++; +}; + +console.log(foo(5)); +``` + +## Tables (TablesExtension) + +| Option | Description | +| ------ | ----------- | +| data | path to data files to supply the data that will be passed into templates. | +| engine | engine to be used for processing templates. Handlebars is the default. | +| ext | extension to be used for dest files. | + +Alignment + +| Syntax | Description | Test Text | +| :--- | :----: | ---: | +| Header | Title | Here's this | +| Paragraph | Text | And more | + +| Markdown Table | With Extra Features Test| +| -------- | --------: | +| [link](https://jsoup.org/apidocs/org/jsoup/nodes/Element.html#attr(java.lang.String,java.lang.String)) | +| `code` | ~~strikethrough~~ | +| *italics* | **emphasis** | + + +## Links + +[link text](http://dev.nodeca.com) + +[link with title](http://nodeca.github.io/pica/demo/ "title text!") + + + + + +In a hole in the ground there lived a hobbit. Not a nasty, dirty, wet hole, filled with the ends +of worms and an oozy smell, nor yet a dry, bare, sandy hole with nothing in it to sit down on or to +eat: it was a [hobbit-hole][1], and that means comfort. + +[1]: "Hobbit lifestyles" + +[relative link, gitub](../README.md) + + +## Images + +![Minion](https://octodex.github.com/images/minion.png) +![Stormtroopocat](https://octodex.github.com/images/stormtroopocat.jpg "The Stormtroopocat") + +Like links, Images also have a footnote style syntax + +![Alt text][id] + +With a reference later in the document defining the URL location: + +[id]: https://octodex.github.com/images/dojocat.jpg "The Dojocat" + +![relative image link, github](test-image.jpg) + + +## Escaping Characters + +\* Without the backslash, this would be a bullet in an unordered list. + + +# OTHER PLUGINS +--- + +## StrikethroughSubscriptExtension & SuperscriptExtension + +- ~~Strikethrough~~ +- 19^th^ +- H~2~O + + +## InsExtension + +hey ++you++ will be rendered as inserted text + + +## TaskListExtension + +- [x] This is done +- [ ] This is not done yet +- [ ] This is not done yet + + +## FootnoteExtension + +Footnote 1 link[^first]. + +Footnote 2 link[^second]. + + +Duplicated footnote reference[^second]. + +[^first]: Footnote **can have markup** + + and multiple paragraphs. + +[^second]: Footnote text. + + +## WikiLinkExtension + +[[pages/viewpage.action?pageId=65546]] + + +## DefinitionExtension + +Term 1 + +: Definition 1 +with lazy continuation. + +Term 2 with *inline markup* + +: Definition 2 + + { some code, part of Definition 2 } + + Third paragraph of definition 2. + +_Compact style:_ + +Term 1 + ~ Definition 1 + +Term 2 + ~ Definition 2a + ~ Definition 2b + + +## AnchorLinkExtension + +[this should link to the top](#h1-heading) + + +## AutoLinkExtension + +Autoconverted link https://github.com/nodeca/pica + + +## YouTubeLinkExtension + +[youtube video](https://www.youtube.com/watch?v=VSv64fV0LDk) + +TOFIX: This plugin doesn't work. Has no effect on the HTML. + + +## TOCExtension + +[TOC levels=1,2] + +[TOC levels=1,2]: # "my table of contents" diff --git a/flexmark-ext-resizable-image/src/test/resources/test-image.jpg b/flexmark-ext-resizable-image/src/test/resources/test-image.jpg new file mode 100644 index 000000000..ba91e009d Binary files /dev/null and b/flexmark-ext-resizable-image/src/test/resources/test-image.jpg differ diff --git a/flexmark-java-samples/flexmark-java-samples.iml b/flexmark-java-samples/flexmark-java-samples.iml index 6aa2b201a..39c557f3a 100644 --- a/flexmark-java-samples/flexmark-java-samples.iml +++ b/flexmark-java-samples/flexmark-java-samples.iml @@ -59,6 +59,7 @@ + diff --git a/flexmark-java.iml b/flexmark-java.iml index 5a5743655..0644c646e 100644 --- a/flexmark-java.iml +++ b/flexmark-java.iml @@ -36,6 +36,7 @@ + diff --git a/flexmark-osgi/pom.xml b/flexmark-osgi/pom.xml index 9f6c8cbeb..9d182b49b 100644 --- a/flexmark-osgi/pom.xml +++ b/flexmark-osgi/pom.xml @@ -118,6 +118,11 @@ flexmark-ext-media-tags ${project.version}
+ + com.vladsch.flexmark + flexmark-ext-resizable-image + ${project.version} + com.vladsch.flexmark flexmark-ext-ins diff --git a/flexmark-test-suite/flexmark-test-suite.iml b/flexmark-test-suite/flexmark-test-suite.iml index f43dac55f..bf14bb775 100644 --- a/flexmark-test-suite/flexmark-test-suite.iml +++ b/flexmark-test-suite/flexmark-test-suite.iml @@ -35,6 +35,7 @@ + diff --git a/pom.xml b/pom.xml index 9a42acf3e..2c76472d3 100644 --- a/pom.xml +++ b/pom.xml @@ -47,6 +47,7 @@ flexmark-ext-jekyll-tag flexmark-ext-macros flexmark-ext-media-tags + flexmark-ext-resizable-image flexmark-ext-spec-example flexmark-ext-superscript flexmark-ext-tables