Skip to content

Make inline code blocks stand out more #398

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import org.frankframework.frankdoc.model.EnumValue;
import org.frankframework.frankdoc.util.LogUtil;
import org.frankframework.frankdoc.wrapper.FrankClass;
import org.frankframework.frankdoc.wrapper.FrankDocException;
import org.frankframework.frankdoc.wrapper.FrankMethod;
import org.frankframework.frankdoc.wrapper.FrankType;
import org.xml.sax.ContentHandler;
Expand All @@ -45,9 +44,7 @@
import javax.xml.XMLConstants;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.parsers.SAXParserFactory;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import java.io.StringReader;
Expand All @@ -64,7 +61,6 @@
import java.util.function.Function;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.stream.Collectors;

/**
* Utility methods for the Frank!Doc.
Expand Down Expand Up @@ -369,7 +365,7 @@ public static String substituteJavadocTags(String text, FrankClass context) {
}

private static String replaceLiteralValue(String text) {
return replacePattern(text, JAVADOC_LITERAL_START_DELIMITER, Utils::getLiteralValueReplacement);
return replacePattern(text, JAVADOC_LITERAL_START_DELIMITER, Utils::getCodeValueReplacement);
}

private static String replaceCodeValue(String text) {
Expand All @@ -384,10 +380,6 @@ private static String getCodeValueReplacement(String codeBlock) {
return "<code>" + StringEscapeUtils.escapeHtml4(codeBlock) + "</code>";
}

private static String getLiteralValueReplacement(String value) {
return String.format("`%s`", StringEscapeUtils.escapeHtml4(value));
}

private static String getClassFieldValueReplacement(String ref, FrankClass context) {
if (context == null) {
return ref;
Expand Down
22 changes: 18 additions & 4 deletions frank-doc-frontend/src/styles.scss
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
/* You can add global styles to this file, and also import other style files */
@use "sass:meta";
@use "sass:map";

@use '@frankframework/angular-components';
@use '@frankframework/angular-components/styles/variables';

$custom-variables: ('bgcolor-light-gray': #e5e5e5);

@font-face {
font-family: 'DM Mono';
Expand All @@ -22,8 +24,12 @@ app-root {
@each $key, $value in meta.module-variables('variables') {
--#{$key}: #{$value};
}
@each $key, $value in $custom-variables {
--#{$key}: #{$value};
}
}


.page-container {
display: flex;
max-width: 100%;
Expand Down Expand Up @@ -114,9 +120,21 @@ h3.sub-title {

code {
white-space: pre;
padding: 0;
font-size: 100%;
background: transparent;
border-radius: 0;
}
}

code {
padding: .2em .4em;
font-family: 'DM Mono', monospace;
font-size: 85%;
background: map.get($custom-variables, 'bgcolor-light-gray');
border-radius: 5px;
}

a {
color: variables.$ff-anchor-default;
font-size: 16px;
Expand All @@ -136,10 +154,6 @@ h3.sub-title {
text-underline-position: from-font;
}
}

code {
font-family: 'DM Mono', monospace;
}
}

.javadoc p,
Expand Down
Loading