Update CHANGELOG for upcoming 4.3.0 version
This commit is contained in:
		
							parent
							
								
									8da8a37178
								
							
						
					
					
						commit
						cc35c35581
					
				
							
								
								
									
										11
									
								
								CHANGELOG.md
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								CHANGELOG.md
									
									
									
									
									
								
							| @ -1,7 +1,18 @@ | |||||||
| # Changelog | # Changelog | ||||||
| 
 | 
 | ||||||
| # 4.3.0-SNAPSHOT | # 4.3.0-SNAPSHOT | ||||||
|  | * add `MarkwonInlineParserPlugin` in `inline-parser` module | ||||||
|  | * `JLatexMathPlugin` now supports both inline and block structures | ||||||
| 
 | 
 | ||||||
|  |   this comes with a breaking change: `JLatexMathPlugin` now depends on `inline-parser` module and `MarkwonInlineParserPlugin` must be explicitly added to a `Markwon` instance: | ||||||
|  |   ```java | ||||||
|  |   final Markwon markwon = Markwon.builder(this) | ||||||
|  |         .usePlugin(MarkwonInlineParserPlugin.create()) | ||||||
|  |         .usePlugin(JLatexMathPlugin.create(textSize)) | ||||||
|  |         .build(); | ||||||
|  |   ``` | ||||||
|  | * `JLatexMathPlugin`: add `theme` (to customize both inlines and blocks) | ||||||
|  | * `JLatexMathPlugin`: add `renderMode` to use previous (pre `4.3.0`) LaTeX rendering | ||||||
| 
 | 
 | ||||||
| # 4.2.2 | # 4.2.2 | ||||||
| * Fixed `AsyncDrawable` display when it has placeholder with empty bounds ([#189]) | * Fixed `AsyncDrawable` display when it has placeholder with empty bounds ([#189]) | ||||||
|  | |||||||
| @ -15,7 +15,7 @@ import org.commonmark.parser.block.ParserState; | |||||||
|  * @since 4.3.0-SNAPSHOT (although there was a class with the same name, |  * @since 4.3.0-SNAPSHOT (although there was a class with the same name, | ||||||
|  * which is renamed now to {@link JLatexMathBlockParserLegacy}) |  * which is renamed now to {@link JLatexMathBlockParserLegacy}) | ||||||
|  */ |  */ | ||||||
| public class JLatexMathBlockParser extends AbstractBlockParser { | class JLatexMathBlockParser extends AbstractBlockParser { | ||||||
| 
 | 
 | ||||||
|     private static final char DOLLAR = '$'; |     private static final char DOLLAR = '$'; | ||||||
|     private static final char SPACE = ' '; |     private static final char SPACE = ' '; | ||||||
|  | |||||||
| @ -11,7 +11,7 @@ import org.commonmark.parser.block.ParserState; | |||||||
| /** | /** | ||||||
|  * @since 4.3.0-SNAPSHOT (although it is just renamed parser from previous versions) |  * @since 4.3.0-SNAPSHOT (although it is just renamed parser from previous versions) | ||||||
|  */ |  */ | ||||||
| public class JLatexMathBlockParserLegacy extends AbstractBlockParser { | class JLatexMathBlockParserLegacy extends AbstractBlockParser { | ||||||
| 
 | 
 | ||||||
|     private final JLatexMathBlock block = new JLatexMathBlock(); |     private final JLatexMathBlock block = new JLatexMathBlock(); | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -11,7 +11,7 @@ import io.noties.markwon.inlineparser.InlineProcessor; | |||||||
| /** | /** | ||||||
|  * @since 4.3.0-SNAPSHOT |  * @since 4.3.0-SNAPSHOT | ||||||
|  */ |  */ | ||||||
| public class JLatexMathInlineProcessor extends InlineProcessor { | class JLatexMathInlineProcessor extends InlineProcessor { | ||||||
| 
 | 
 | ||||||
|     private static final Pattern RE = Pattern.compile("(\\${2})([\\s\\S]+?)\\1"); |     private static final Pattern RE = Pattern.compile("(\\${2})([\\s\\S]+?)\\1"); | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -127,22 +127,22 @@ public class LatexActivity extends ActivityWithMenuOptions { | |||||||
|         final float textSize = textView.getTextSize(); |         final float textSize = textView.getTextSize(); | ||||||
|         final Resources r = getResources(); |         final Resources r = getResources(); | ||||||
| 
 | 
 | ||||||
|         final Markwon markwon = Markwon.builder(this) | final Markwon markwon = Markwon.builder(this) | ||||||
|                 // NB! `MarkwonInlineParserPlugin` is required in order to parse inlines |         // NB! `MarkwonInlineParserPlugin` is required in order to parse inlines | ||||||
|                 .usePlugin(MarkwonInlineParserPlugin.create()) |         .usePlugin(MarkwonInlineParserPlugin.create()) | ||||||
|                 .usePlugin(JLatexMathPlugin.create(textSize, textSize * 1.25F, builder -> { |         .usePlugin(JLatexMathPlugin.create(textSize, textSize * 1.25F, builder -> { | ||||||
|                     builder.theme() |             builder.theme() | ||||||
|                             .inlineBackgroundProvider(() -> new ColorDrawable(0x1000ff00)) |                     .inlineBackgroundProvider(() -> new ColorDrawable(0x1000ff00)) | ||||||
|                             .blockBackgroundProvider(() -> new ColorDrawable(0x10ff0000)) |                     .blockBackgroundProvider(() -> new ColorDrawable(0x10ff0000)) | ||||||
|                             .blockPadding(JLatexMathTheme.Padding.symmetric( |                     .blockPadding(JLatexMathTheme.Padding.symmetric( | ||||||
|                                     r.getDimensionPixelSize(R.dimen.latex_block_padding_vertical), |                             r.getDimensionPixelSize(R.dimen.latex_block_padding_vertical), | ||||||
|                                     r.getDimensionPixelSize(R.dimen.latex_block_padding_horizontal) |                             r.getDimensionPixelSize(R.dimen.latex_block_padding_horizontal) | ||||||
|                             )); |                     )); | ||||||
| 
 | 
 | ||||||
|                     // explicitly request LEGACY rendering mode |             // explicitly request LEGACY rendering mode | ||||||
| //                    builder.renderMode(JLatexMathPlugin.RenderMode.LEGACY); | //                    builder.renderMode(JLatexMathPlugin.RenderMode.LEGACY); | ||||||
|                 })) |         })) | ||||||
|                 .build(); |         .build(); | ||||||
| 
 | 
 | ||||||
|         markwon.setMarkdown(textView, markdown); |         markwon.setMarkdown(textView, markdown); | ||||||
|     } |     } | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Dimitry Ivanov
						Dimitry Ivanov