/** * Process the body of the file. * * @param context the parser context */ private void processDefaultBody(ParserContext context) { StringBuilder body = new StringBuilder(); boolean inBody = false; for (String line : context.getFileLines()) { if (inBody) { body.append(line).append("\n"); } if (line.equals(configuration.getHeaderSeparator())) { inBody = true; } } if (body.length() == 0) { for (String line : context.getFileLines()) { body.append(line).append("\n"); } } context.setBody(body.toString()); } }
@Override public void processBody(ParserContext context) { StringBuilder body = new StringBuilder(context.getBody().length()); if (!context.hasHeader()) { for (String line : context.getFileLines()) { body.append(line).append("\n"); } context.setBody(body.toString()); } processAsciiDoc(context); }
/** * Process the header of the file. * * @param context the parser context */ private void processDefaultHeader(ParserContext context) { for (String line : context.getFileLines()) { if (hasHeaderSeparator(line)) { break; } processHeaderLine(line, context.getDocumentModel()); } }
/** * Process the body of the file. * * @param context the parser context */ private void processDefaultBody(ParserContext context) { StringBuilder body = new StringBuilder(); boolean inBody = false; for (String line : context.getFileLines()) { if (inBody) { body.append(line).append("\n"); } if (line.equals(configuration.getHeaderSeparator())) { inBody = true; } } if (body.length() == 0) { for (String line : context.getFileLines()) { body.append(line).append("\n"); } } context.setBody(body.toString()); } }
@Override public void processBody(ParserContext context) { StringBuilder body = new StringBuilder(context.getBody().length()); if (!context.hasHeader()) { for (String line : context.getFileLines()) { body.append(line).append("\n"); } context.setBody(body.toString()); } processAsciiDoc(context); }
/** * Process the header of the file. * * @param context the parser context */ private void processDefaultHeader(ParserContext context) { for (String line : context.getFileLines()) { if (hasHeaderSeparator(line)) { break; } processHeaderLine(line, context.getDocumentModel()); } }