com.vladsch.flexmark.util.format.options.HeadingStyle Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of flexmark-util-format Show documentation
Show all versions of flexmark-util-format Show documentation
flexmark-java format utility classes
The newest version!
package com.vladsch.flexmark.util.format.options;
// IMPORTANT: implement this format option
public enum HeadingStyle {
AS_IS,
ATX_PREFERRED,
SETEXT_PREFERRED,
;
public boolean isNoChange() {
return this == AS_IS;
}
public boolean isNoChange(boolean isSetext, int level) {
return this == AS_IS
|| this == SETEXT_PREFERRED && (isSetext || level > 2)
|| this == ATX_PREFERRED && !isSetext;
}
public boolean isAtx() {
return this == ATX_PREFERRED;
}
public boolean isSetext() {
return this == SETEXT_PREFERRED;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy