Dave Jarvis' Repositories

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

Update source code comments

AuthorDaveJarvis <email>
Date2020-10-17 17:34:16 GMT-0700
Commitb92ed17c0785c499fbaa90885e0203284e272cbe
Parent249e52e
Delta25 lines added, 1 line removed, 24-line increase
src/main/java/com/keenwrite/processors/markdown/r/RExtension.java
/**
- * Creates an extension capable of handling delimited TeX code in Markdown.
+ * Creates an extension capable of intercepting R code blocks and preventing
+ * them from being converted into HTML {@code <code>} elements.
*/
public static RExtension create() {
src/main/java/com/keenwrite/processors/markdown/CaretPosition.java
}
+ /**
+ * Used for building a new {@link CaretPosition} instance.
+ */
public static class Mutator {
/**
* Caret's current paragraph index (i.e., current caret line number).
*/
private ObservableValue<Integer> mParagraph;
+ /**
+ * Used to count the number of lines in the text editor document.
+ */
private LiveList<Paragraph<Collection<String>, String,
Collection<String>>> mParagraphs;
}
+ /**
+ * Returns the number of lines in the text editor.
+ *
+ * @return The size of the text editor's paragraph list plus one.
+ */
private int getParagraphCount() {
return mMutator.mParagraphs.size() + 1;
}
+ /**
+ * Returns the absolute position of the caret within the entire document.
+ *
+ * @return A zero-based index of the caret position.
+ */
private int getTextOffset() {
return mMutator.mTextOffset.getValue();
}
+ /**
+ * Returns the position of the caret within the current paragraph being
+ * edited.
+ *
+ * @return A zero-based index of the caret position relative to the
+ * current paragraph.
+ */
private int getParaOffset() {
return mMutator.mParaOffset.getValue();