@Test public void canStart() { assertFalse(block.canStart(LineSequence.create(""))); assertTrue(block.canStart(LineSequence.create("<div>"))); assertTrue(block.canStart(LineSequence.create("<table>"))); assertTrue(block.canStart(LineSequence.create("<p>"))); assertFalse(block.canStart(LineSequence.create("<one>"))); assertTrue(block.canStart(LineSequence.create(" <p>"))); assertFalse(block.canStart(LineSequence.create(" <p>"))); assertTrue(block.canStart(LineSequence.create("<p"))); assertTrue(block.canStart(LineSequence.create("<p >"))); assertTrue(block.canStart(LineSequence.create("<p />"))); assertTrue(block.canStart(LineSequence.create("<p/>"))); assertTrue(block.canStart(LineSequence.create("<p\n a=\"b\"\n>"))); }
@Override public boolean canStart(LineSequence lineSequence) { Line line = lineSequence.getCurrentLine(); if (line != null) { return startPattern.matcher(line.getText()).matches(); } return false; }
HtmlBlock extends SourceBlock { @Override public boolean canStart(LineSequence lineSequence) { Line line = lineSequence.getCurrentLine(); if (line != null) { return startPattern.matcher(line.getText()).matches(); } return false; } }
HtmlBlock extends SourceBlock { @Override public boolean canStart(LineSequence lineSequence) { Line line = lineSequence.getCurrentLine(); if (line != null) { return startPattern.matcher(line.getText()).matches(); } return false; }  }
HtmlBlock extends SourceBlock { @Override public boolean canStart(LineSequence lineSequence) { Line line = lineSequence.getCurrentLine(); if (line != null) { return startPattern.matcher(line.getText()).matches(); } return false; }  @Override void process(ProcessingContext context, DocumentBuilder builder, LineSequence lineSequence); @Override boolean canStart(LineSequence lineSequence); }
HtmlBlock extends SourceBlock { @Override public boolean canStart(LineSequence lineSequence) { Line line = lineSequence.getCurrentLine(); if (line != null) { return startPattern.matcher(line.getText()).matches(); } return false; }  @Override void process(ProcessingContext context, DocumentBuilder builder, LineSequence lineSequence); @Override boolean canStart(LineSequence lineSequence);  }