Dave Jarvis' Repositories

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

Integrate font size setting for text editor

AuthorDaveJarvis <email>
Date2020-12-28 13:35:40 GMT-0800
Commitf75ed9e74a0625b73d93d9855fdf02461eb7188a
Parent141729b
Delta28 lines added, 26 lines removed, 2-line increase
src/test/java/com/keenwrite/editors/markdown/MarkdownEditorTest.java
package com.keenwrite.editors.markdown;
+import com.keenwrite.preferences.Workspace;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import static org.junit.jupiter.api.Assertions.assertTrue;
-@ExtendWith(ApplicationExtension.class)
+@ExtendWith( ApplicationExtension.class )
public class MarkdownEditorTest {
private static final String[] WORDS = new String[]{
- "Italicize",
- "English's",
- "foreign",
- "words",
- "based",
- "on",
- "popularity,",
- "like",
- "_bête_",
- "_noire_",
- "and",
- "_Weltanschauung_",
- "but",
- "not",
- "résumé.",
- "Don't",
- "omit",
- "accented",
- "characters!",
- "Cœlacanthe",
- "L'Haÿ-les-Roses",
- "Mühlfeldstraße",
- "Da̱nx̱a̱laga̱litła̱n",
+ "Italicize",
+ "English's",
+ "foreign",
+ "words",
+ "based",
+ "on",
+ "popularity,",
+ "like",
+ "_bête_",
+ "_noire_",
+ "and",
+ "_Weltanschauung_",
+ "but",
+ "not",
+ "résumé.",
+ "Don't",
+ "omit",
+ "accented",
+ "characters!",
+ "Cœlacanthe",
+ "L'Haÿ-les-Roses",
+ "Mühlfeldstraße",
+ "Da̱nx̱a̱laga̱litła̱n",
};
private static final String TEXT = String.join( " ", WORDS );
private static final Pattern REGEX = compile(
- "[^\\p{Mn}\\p{Me}\\p{L}\\p{N}'-]+" );
+ "[^\\p{Mn}\\p{Me}\\p{L}\\p{N}'-]+" );
/**
*/
private MarkdownEditor createMarkdownEditor() {
- final var editor = new MarkdownEditor();
+ final var workspace = new Workspace();
+ final var editor = new MarkdownEditor( workspace );
editor.setText( TEXT );
return editor;