aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/construct/gfm_label_start_footnote.rs5
-rw-r--r--src/construct/raw_flow.rs5
-rw-r--r--src/construct/raw_text.rs1
-rw-r--r--src/event.rs1
-rw-r--r--src/util/constant.rs7
5 files changed, 12 insertions, 7 deletions
diff --git a/src/construct/gfm_label_start_footnote.rs b/src/construct/gfm_label_start_footnote.rs
index a3a0df6..c123bfc 100644
--- a/src/construct/gfm_label_start_footnote.rs
+++ b/src/construct/gfm_label_start_footnote.rs
@@ -20,8 +20,9 @@
//!
//! ## Tokens
//!
-//! * [`LabelImage`][Name::LabelImage]
-//! * To do.
+//! * [`GfmFootnoteCallLabel`][Name::GfmFootnoteCallLabel]
+//! * [`GfmFootnoteCallMarker`][Name::GfmFootnoteCallMarker]
+//! * [`LabelMarker`][Name::LabelMarker]
//!
//! ## References
//!
diff --git a/src/construct/raw_flow.rs b/src/construct/raw_flow.rs
index 7eaac0c..395d0ae 100644
--- a/src/construct/raw_flow.rs
+++ b/src/construct/raw_flow.rs
@@ -143,7 +143,7 @@ use crate::event::{Content, Link, Name};
use crate::state::{Name as StateName, State};
use crate::tokenizer::Tokenizer;
use crate::util::{
- constant::{CODE_FENCED_SEQUENCE_SIZE_MIN, TAB_SIZE},
+ constant::{CODE_FENCED_SEQUENCE_SIZE_MIN, MATH_FLOW_SEQUENCE_SIZE_MIN, TAB_SIZE},
slice::{Position, Slice},
};
@@ -253,10 +253,9 @@ pub fn sequence_open(tokenizer: &mut Tokenizer) -> State {
tokenizer.consume();
State::Next(StateName::RawFlowSequenceOpen)
}
- // To do: constant.
else if tokenizer.tokenize_state.size
< (if tokenizer.tokenize_state.marker == b'$' {
- 2
+ MATH_FLOW_SEQUENCE_SIZE_MIN
} else {
CODE_FENCED_SEQUENCE_SIZE_MIN
})
diff --git a/src/construct/raw_text.rs b/src/construct/raw_text.rs
index 1a4d03c..6a35608 100644
--- a/src/construct/raw_text.rs
+++ b/src/construct/raw_text.rs
@@ -112,7 +112,6 @@
//! [text]: crate::construct::text
//! [code_indented]: crate::construct::code_indented
//! [raw_flow]: crate::construct::raw_flow
-//! [math_flow]: # "to do"
//! [html_code]: https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-code-element
use crate::event::Name;
diff --git a/src/event.rs b/src/event.rs
index fc7722d..458bd19 100644
--- a/src/event.rs
+++ b/src/event.rs
@@ -2807,7 +2807,6 @@ pub struct Point {
impl Point {
/// Create a new point, that is shifted from the close earlier current
/// point, to `index.`
- // To do: tabs.
pub fn shift_to(&self, bytes: &[u8], index: usize) -> Point {
let mut next = self.clone();
debug_assert!(index > next.index, "expect");
diff --git a/src/util/constant.rs b/src/util/constant.rs
index d6a6651..a9a7895 100644
--- a/src/util/constant.rs
+++ b/src/util/constant.rs
@@ -248,6 +248,13 @@ pub const LINK_REFERENCE_SIZE_MAX: usize = 999;
/// [list-item]: crate::construct::list_item
pub const LIST_ITEM_VALUE_SIZE_MAX: usize = 10;
+/// The number of markers needed for [math (flow)][raw_flow] to form.
+///
+/// Unlike code (fenced), this number is `2`.
+///
+/// [raw_flow]: crate::construct::raw_flow
+pub const MATH_FLOW_SEQUENCE_SIZE_MIN: usize = 2;
+
/// Maximum allowed unbalanced parens in destination.
///
/// There can be many balanced parens, but if there are 33 opens that were not