Dave Jarvis' Repositories

git clone https://repo.autonoma.ca/repo/keenwrite.git

Upgrade Aho-Corasick library; update allowable basic fenced div class names

Author DaveJarvis <email>
Date 2021-03-04 00:02:37 GMT-0800
Commit 84f07d57a4a9c72cd154747f20872eaf82ad2905
Parent 4fe1041
Delta 6 lines added, 5 lines removed, 1-line increase
build.gradle
// Misc.
- implementation 'org.ahocorasick:ahocorasick:0.4.0'
+ implementation 'org.ahocorasick:ahocorasick:0.6.3'
implementation 'org.apache.commons:commons-configuration2:2.7'
implementation 'com.googlecode.juniversalchardet:juniversalchardet:1.0.3'
docs/div.md
```
-Note that when usingn the extended syntax, class styles must be prefixed with
+Note that when using the extended syntax, class styles must be prefixed with
a period (e.g., `.stanza` in the example).
-# Nested
+# Nested Syntax
Fenced divs may be nested, such as in the following example:
src/main/java/com/keenwrite/processors/markdown/extensions/fences/FencedDivExtension.java
*/
private static final Pattern FENCE_OPENING = Pattern.compile(
- "^:::+\\s+(\\w[\\w-]*|\\{.+})\\s*$" );
+ "^:::+\\s+([\\p{IsAlphabetic}\\p{IsDigit}-_]+|\\{.+})\\s*$" );
/**
"\\s*" +
"(?<d>[#.][\\p{IsAlphabetic}\\p{IsDigit}-_]+[^\\s=])|" +
- "((?<k>[\\p{IsAlphabetic}\\p{IsDigit}-_]+)=\"*(?<v>(?<=\")[^\"]+(?=\")|([^\\s]+))\"*)" );
+ "((?<k>[\\p{IsAlphabetic}\\p{IsDigit}-_]+)=" +
+ "\"*(?<v>(?<=\")[^\"]+(?=\")|([^\\s]+))\"*)" );
public static FencedDivExtension create() {