pub struct BoldMarkerValidator;Expand description
Validator for bold marker insertion
Implementations§
Source§impl BoldMarkerValidator
impl BoldMarkerValidator
Sourcepub fn validate_boundary_context(
preceding_text: &str,
_group_text: &str,
following_text: &str,
) -> bool
pub fn validate_boundary_context( preceding_text: &str, _group_text: &str, following_text: &str, ) -> bool
Task B.2: Enhanced boundary validation with word boundary context
Prevents bold markers from being inserted at invalid word boundaries. This prevents patterns like:
theBold(mid-word, part of CamelCase)boldness(not full word)
§Arguments
preceding_text- Text before the bold group (context)group_text- The bold group’s contentfollowing_text- Text after the bold group (context)
§Returns
true if bold group has valid word boundaries before/after
Sourcepub fn can_insert_markers(group: &BoldGroup) -> BoldMarkerDecision
pub fn can_insert_markers(group: &BoldGroup) -> BoldMarkerDecision
Validate if markers can be safely inserted
Sourcepub fn validate_group_sequence(groups: &[BoldGroup]) -> Result<(), String>
pub fn validate_group_sequence(groups: &[BoldGroup]) -> Result<(), String>
Check if all markers in a sequence are valid
Sourcepub fn predict_markdown(group: &BoldGroup) -> String
pub fn predict_markdown(group: &BoldGroup) -> String
Predict markdown output for group
Auto Trait Implementations§
impl Freeze for BoldMarkerValidator
impl RefUnwindSafe for BoldMarkerValidator
impl Send for BoldMarkerValidator
impl Sync for BoldMarkerValidator
impl Unpin for BoldMarkerValidator
impl UnwindSafe for BoldMarkerValidator
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more