slweb

Једноставни генератор статичких веб страна
Дневник | Датотеке | Референце | ПРОЧИТАЈМЕ | ЛИЦЕНЦА

чување 8064ec3e4e4beff77c2b1c90b02ae7c9e76df8cd
родитељ 74c391754d9b7016c3f3033791b061da249297a8
Аутор: Страхиња Радић <contact@strahinja.org>
Датум:   Wed, 25 Nov 2020 20:17:57 +0100

Corrected a line in manpage, added 'g' option to the end of some regexps

Signed-off-by: Страхиња Радић <contact@strahinja.org>

Diffstat:
M.gitignore | 1+
Dexamples/tags/index.html | 23-----------------------
Mslweb.1.in | 3++-
Mslweb.in | 8++++----
измењених датотека: 4, додавања: 7(+), брисања: 28(-)

diff --git a/.gitignore b/.gitignore @@ -13,4 +13,5 @@ slweb slweb.1 examples/basic/index.html examples/includes/index.html +examples/tags/index.html diff --git a/examples/tags/index.html b/examples/tags/index.html @@ -1,23 +0,0 @@ -<!DOCTYPE html> -<html lang="en"> -<head> - <title>Tag test</title> - <meta charset="utf8" /> - <meta name="viewport" content="width=device-width, initial-scale=1" /> - <meta name="generator" content="slweb" /> -</head> -<body> -<test>Tag test</test> - -<test class="class mysecondclass selected">Selected text</test> - -<test id="firstid">First id</test> - -<test id="secondid" class="class">Second id</test> - -<test id="thirdid" class="class"> - <div id="someid">Some id</div><!--#someid--> - <div class="someclass">Some class</div><!--.someclass--> -</test> -</body> -</html> diff --git a/slweb.1.in b/slweb.1.in @@ -135,7 +135,8 @@ Directive \fC{include "somefile"}\fR will run \fCslweb -b\fR on .I somefile.slw (related to the directory containing the file containing the directive) and include the resulting -.SM HTML. Directive needs to start at the beginning of the line. +.SM HTML. +Directive needs to start at the beginning of the line. . .IP \[bu] .BR "Previous Git commit information" . diff --git a/slweb.in b/slweb.in @@ -148,11 +148,11 @@ function body() -e 's/\([^\\]\){\/#\([a-z0-9-]\+\)}/\1<\/div><!--#\2-->/g' \ -e 's/\\\({\/#[a-z0-9-]\+}\)/\1/g' \ -e 's/ $/<br \/>/g' \ - -e "s/^\\[\\([^]]\\+\\)\\](\\([a-z]\+:\/\/[^)]\\+\\))/<a href=\"\\2\">\\1<\\/a>/" \ - -e "s/\\([^\\\\]\\)\\[\\([^]]\\+\\)\\](\\([a-z]\+:\/\/[^)]\\+\\))/\\1<a href=\"\\3\">\\2<\\/a>/" \ + -e "s/^\\[\\([^]]\\+\\)\\](\\([a-z]\+:\/\/[^)]\\+\\))/<a href=\"\\2\">\\1<\\/a>/g" \ + -e "s/\\([^\\\\]\\)\\[\\([^]]\\+\\)\\](\\([a-z]\+:\/\/[^)]\\+\\))/\\1<a href=\"\\3\">\\2<\\/a>/g" \ -e 's/\\\(\[[^]]\+\]([a-z]\+:\/\/[^)]\+)\)/\1/g' \ - -e "s/^\\[\\([^]]\\+\\)\\](\\([^)]\\+\\))/<a href=\"$(realpath --relative-to=$BASEDIR $(dirname $INFILE) | sed -e's/\//\\\//g' -e's/&/\\\&/g')\/\\2\">\\1<\\/a>/" \ - -e "s/\\([^\\\\]\\)\\[\\([^]]\\+\\)\\](\\([^)]\\+\\))/\\1<a href=\"$(realpath --relative-to=$BASEDIR $(dirname $INFILE) | sed -e's/\//\\\//g' -e's/&/\\\&/g')\/\\3\">\\2<\\/a>/" \ + -e "s/^\\[\\([^]]\\+\\)\\](\\([^)]\\+\\))/<a href=\"$(realpath --relative-to=$BASEDIR $(dirname $INFILE) | sed -e's/\//\\\//g' -e's/&/\\\&/g')\/\\2\">\\1<\\/a>/g" \ + -e "s/\\([^\\\\]\\)\\[\\([^]]\\+\\)\\](\\([^)]\\+\\))/\\1<a href=\"$(realpath --relative-to=$BASEDIR $(dirname $INFILE) | sed -e's/\//\\\//g' -e's/&/\\\&/g')\/\\3\">\\2<\\/a>/g" \ -e 's/\\\(\[[^]]\+\]([^)]\+)\)/\1/g') INCLUDE=$(echo "$BODY" | \