about summary refs log tree commit diff stats
path: root/prototypes/browse/25-soft-newlines
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2020-06-06 07:41:00 -0700
committerKartik Agaram <vc@akkartik.com>2020-06-06 08:27:48 -0700
commit0fa80fb1a3a2a8741e3f48df76033cf1b3990ce0 (patch)
treef955e601365e4c18a68a474c3eebf0bd3e91923e /prototypes/browse/25-soft-newlines
parent725f6702ff90a2da35ce83b298fbc7f991ebd9d1 (diff)
downloadmu-0fa80fb1a3a2a8741e3f48df76033cf1b3990ce0.tar.gz
6489 - browse app: headers
Again quite ugly. There's an increasing amount of state here, particularly
the interplay between headers and soft newlines.
Diffstat (limited to 'prototypes/browse/25-soft-newlines')
-rw-r--r--prototypes/browse/25-soft-newlines/main.mu5
1 files changed, 4 insertions, 1 deletions
diff --git a/prototypes/browse/25-soft-newlines/main.mu b/prototypes/browse/25-soft-newlines/main.mu
index ec573e9a..7db4050c 100644
--- a/prototypes/browse/25-soft-newlines/main.mu
+++ b/prototypes/browse/25-soft-newlines/main.mu
@@ -40,7 +40,8 @@ $render-normal:loop: {
     # if (c == EOF) break
     compare c, 0xffffffff  # EOF marker
     break-if-=
-    # if (c == newline)
+
+    ## if (c == newline) perform some fairly sophisticated parsing for soft newlines
     compare c, 0xa  # newline
     {
       break-if-!=
@@ -80,6 +81,8 @@ $render-normal:flush-buffered-newline: {
       add-char state, 0x20  # space
       # fall through to print c
     }
+    ## end soft newline support
+
     # if (c == '*') switch to bold
     compare c, 0x2a  # '*'
     {