ypnose / ahrf Goto Github PK
View Code? Open in Web Editor NEWahrf - [a]scii (or [a]wk) [h]uman [r]eadable [f]ile
License: Other
ahrf - [a]scii (or [a]wk) [h]uman [r]eadable [f]ile
License: Other
Running the regression tests using mawk-1.3.4-20131226
shows only one regression, within BLOCK_CODE_PRE_3
(this regression seems to be fixed in 1.3.4-20140914
):
--- BLOCK_CODE_PRE_3.outvalid 2014-10-24 22:20:01.304559299 +0200
+++ BLOCK_CODE_PRE_3.gen 2014-10-26 12:51:44.994553357 +0100
@@ -1,5 +1,4 @@
-<pre><code>====
-Here my code
+<pre><code>Here my code
====</code></pre>
<pre><code>
If you use mawk-1.3.4-20140914
, multiple regressions are shown (using the same code and regexes):
--- BLOCK_CODE_PRE.outvalid 2014-10-24 22:20:01.304559299 +0200
+++ BLOCK_CODE_PRE.gen 2014-10-26 12:56:30.854552376 +0100
@@ -1,9 +1,11 @@
-<pre><code>printf "%s\n" "This is plain wrong!" >&2</code></pre>
+<pre><code>printf "%s\n" "This is plain wrong!" >&2
+====</code></pre>
<pre><code>Filesystem Size Used Avail Use% Mounted on
/dev/sda5 12G 2.5G 8.6G 23% /
dev 3.9G 0 3.9G 0% /dev
run 4.0G 592K 3.9G 1% /run
-tmpfs 4.0G 0 4.0G 0% /dev/shm</code></pre>
+tmpfs 4.0G 0 4.0G 0% /dev/shm
+====</code></pre>
<pre><code>Device Boot Start End Sectors Size Id Type
/dev/sda1 2048 1045719039 1045716992 498,7G 5 Extended
/dev/sda2 1129605120 1192519679 62914560 30G 7 HPFS/NTFS/exFAT
@@ -19,4 +21,5 @@
/dev/sda10 459495424 1045719039 586223616 279,5G 83 Linux
-# Another comment for testing purpose</code></pre>
+# Another comment for testing purpose
+====</code></pre>
--- BLOCK_CODE_PRE_2.outvalid 2014-10-24 22:20:01.304559299 +0200
+++ BLOCK_CODE_PRE_2.gen 2014-10-26 12:56:30.857885709 +0100
@@ -6,7 +6,8 @@
INSIDE ==== MIDDLE
HEH BRO
-==== LAST LINE</code></pre>
+ ==== LAST LINE
+====</code></pre>
<pre><code>
bro >> nope
nana <he
@@ -20,4 +21,5 @@
<<
<<<
<<<<
-end of life / line</code></pre>
+ end of life / line
+====</code></pre>
--- BLOCK_CODE_PRE_3.outvalid 2014-10-24 22:20:01.304559299 +0200
+++ BLOCK_CODE_PRE_3.gen 2014-10-26 12:56:30.864552376 +0100
@@ -1,13 +1,17 @@
<pre><code>====
Here my code
+====
====</code></pre>
<pre><code>
- BLOCK 2</code></pre>
+ BLOCK 2
+====</code></pre>
<pre><code> BLOCK 3
END
- TAB</code></pre>
+ TAB
+====</code></pre>
<pre><code>
BLOCK 4
- </code></pre>
+
+====</code></pre>
--- ESCAPE_CHARS.outvalid 2014-10-24 22:20:01.304559299 +0200
+++ ESCAPE_CHARS.gen 2014-10-26 12:56:30.867885709 +0100
@@ -12,4 +12,5 @@
<rel> = the release version you are using
<build> = the source date of the build. 20140710* and later will fit
<arch> = your system's architecture
-&& YOU'RE DONE</code></pre>
+&& YOU'RE DONE
+====</code></pre>
* LIST_UL ... OK
* PAGE_LINKS_A ... OK
* PARAGRAPH_P ... OK
--- TITLES_H.outvalid 2014-10-24 22:48:11.197886828 +0200
+++ TITLES_H.gen 2014-10-26 12:56:30.881219042 +0100
@@ -1,13 +1,16 @@
+<h1>:</h1>
+<h2>::</h2>
+<h3>:::</h3>
+<h1>This is the H1 title :</h1>
+<h1>This is the H1 title : </h1>
<h1>This is the H1 title</h1>
-<h1>This is the H1 title</h1>
-<h1>This is the H1 title</h1>
-<h2>This is the H2 level</h2>
-<h2>This is the H2 level</h2>
-<h3>This is the H3 level</h3>
-<h3>This is the H3 level</h3>
-<h4>This is the H4 level</h4>
+<h2>This is the H2 level ::</h2>
+<h2>This is the H2 level:: </h2>
+<h3>This is the H3 level :::</h3>
+<h3>This is the H3 level :::</h3>
<h4>This is the H4 level</h4>
-<h5>This is the H5 level</h5>
-<h5>This is the H5 level</h5>
-<h6>This is the H6 level</h6>
-<h6>This is the H6 level</h6>
+<h4>This is the H4 level :::: </h4>
+<h5>This is the H5 level:::::</h5>
+<h5>This is the H5 level ::::: </h5>
+<h6>This is the H6 level ::::::</h6>
+<h6>This is the H6 level :::::: </h6>
With nawk
, gawk
and OpenBSD nawk
, you don't have any issue. I'll contact the main dev ASAP.
EDIT: I'm pretty sure it's related to $
metacharacter...
In the case of naming two or more headings the same, this will produce invalid html.
Maybe the most simple way to avoid this would be to append an incrementing number?
This might be a very simple fix:
savoir-vivre@990414e
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.