@Test public void canStart() { assertFalse(block.canStart(LineSequence.create(""))); assertTrue(block.canStart(LineSequence.create("#"))); assertTrue(block.canStart(LineSequence.create("# "))); assertTrue(block.canStart(LineSequence.create("# #"))); assertTrue(block.canStart(LineSequence.create("# Y"))); assertTrue(block.canStart(LineSequence.create("# Y #"))); assertTrue(block.canStart(LineSequence.create("## Y"))); assertTrue(block.canStart(LineSequence.create("### Y"))); assertTrue(block.canStart(LineSequence.create("#### Y"))); assertTrue(block.canStart(LineSequence.create("##### Y"))); assertTrue(block.canStart(LineSequence.create("###### Y"))); assertFalse(block.canStart(LineSequence.create("####### Y"))); assertTrue(block.canStart(LineSequence.create("# Y#"))); assertFalse(block.canStart(LineSequence.create("#Y"))); assertTrue(block.canStart(LineSequence.create("# #Y"))); assertTrue(block.canStart(LineSequence.create(" # Y"))); assertFalse(block.canStart(LineSequence.create("\t# Y"))); }
@Override public boolean canStart(LineSequence lineSequence) { Line line = lineSequence.getCurrentLine(); return line != null && PATTERN.matcher(line.getText()).matches(); }
AtxHeaderBlock extends SourceBlock { @Override public boolean canStart(LineSequence lineSequence) { Line line = lineSequence.getCurrentLine(); return line != null && PATTERN.matcher(line.getText()).matches(); } }
AtxHeaderBlock extends SourceBlock { @Override public boolean canStart(LineSequence lineSequence) { Line line = lineSequence.getCurrentLine(); return line != null && PATTERN.matcher(line.getText()).matches(); }  }
AtxHeaderBlock extends SourceBlock { @Override public boolean canStart(LineSequence lineSequence) { Line line = lineSequence.getCurrentLine(); return line != null && PATTERN.matcher(line.getText()).matches(); }  @Override void process(ProcessingContext context, DocumentBuilder builder, LineSequence lineSequence); @Override boolean canStart(LineSequence lineSequence); }
AtxHeaderBlock extends SourceBlock { @Override public boolean canStart(LineSequence lineSequence) { Line line = lineSequence.getCurrentLine(); return line != null && PATTERN.matcher(line.getText()).matches(); }  @Override void process(ProcessingContext context, DocumentBuilder builder, LineSequence lineSequence); @Override boolean canStart(LineSequence lineSequence);  }