~aprates/gempress

fc494358d9df2a561369b66182580ce0af35c54d — Antonio Prates 9 months ago 57c216c main
Fix html lang bug
2 files changed, 10 insertions(+), 4 deletions(-)

M src/capsule-to-website.sh
M src/gmi-to-html.c
M src/capsule-to-website.sh => src/capsule-to-website.sh +9 -3
@@ 59,15 59,21 @@ cp -ux $templateDir/styles.css $website
getFilePaths $website
if [[ -n $extraMarkup ]];
then
    echo "Using extra markup conversion: enabled"
    conversionArgs="extraMarkup"
    if [[ $extraMarkup == "enabled" ]];
    then
        echo "Using extra markup conversion: yes"
        conversionArgs="extraMarkup"
        
    fi
else
    echo "Using extra markup conversion: no"
fi
if [[ -n $langCode ]];
then
    if [[ -n $conversionArgs ]];
    then
        echo "Using language code: $langCode"
        conversionArgs="$conversionArgs -lang:$langCode"
        conversionArgs="$conversionArgs lang:$langCode"
    else
        echo "Using language code: $langCode"
        conversionArgs="lang:$langCode"

M src/gmi-to-html.c => src/gmi-to-html.c +1 -1
@@ 150,7 150,7 @@ string lineToHTML(string line) {
// try to get the file from path and generate the corresponding html in place
void convert(string path) {
  if (startsWith(path, "lang:")) {
    htmlTag = join3s("<html lang=\"", &path[6], "\">\n"); // set langCode
    htmlTag = join3s("<html lang='", &path[5], "'>\n"); // set langCode
    return;
  }
  if (startsWith(path, "extraMarkup")) {