Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(483)

Side by Side Diff: java/org/chromium/distiller/webdocument/WebTag.java

Issue 1230583006: Fix for keeping lists structure (Closed) Base URL: https://github.com/chromium/dom-distiller.git@master
Patch Set: Fixed grammar Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 package org.chromium.distiller.webdocument;
2
3 public class WebTag extends WebElement {
mdjones 2015/08/05 15:44:35 Briefly describe what this is and how it is used.
4
5 private String tagName;
6 private TagType tagType;
7
8 public enum TagType {
9 START, END
10 }
11
12 public WebTag(String tagName, TagType tagType) {
13 this.tagName = tagName;
14 this.tagType = tagType;
15 }
16
17 public boolean isStartTag() {
18 return tagType == TagType.START;
19 }
20
21 public String getTagName() {
22 return tagName;
23 }
24
25 @Override
26 public String generateOutput(boolean textOnly) {
27 if (textOnly) {
28 return "";
29 }
30 return "<" + (isStartTag() ? "" : "/") + tagName + ">";
31 }
32 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698