Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Difference From v0.10.1 To trunk
2023-03-28
| ||
16:28 | Version 0.11.1 ... (Leaf check-in: fede87bf67 user: stern tags: trunk, release, v0.11.1) | |
2023-03-27
| ||
14:53 | Version 0.11.0 ... (check-in: 30ca5d039f user: stern tags: trunk, release, v0.11.0) | |
2023-01-30
| ||
12:49 | Merge in 0.10.1 ... (check-in: ed2d3ce05d user: stern tags: trunk) | |
12:40 | Version 0.10.1 ... (Leaf check-in: 70b0cdc454 user: stern tags: release, release-0.10, v0.10.1) | |
2023-01-24
| ||
21:47 | Version 0.10.0 ... (check-in: b6301cf091 user: stern tags: trunk, release, v0.10.0) | |
Changes to LICENSE.txt.
| 1 2 3 4 5 6 7 8 | - + |
|
︙ |
Changes to Makefile.
1 | 1 2 3 4 5 6 7 8 9 | - + |
|
︙ |
Changes to VERSION.
| 1 | - + |
|
Changes to ast/ast.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ |
Changes to ast/block.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ |
Changes to ast/inline.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ |
Changes to ast/ref.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ |
Changes to ast/ref_test.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ |
Changes to ast/walk.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ |
Changes to ast/walk_test.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ |
Changes to auth/auth.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ |
Changes to auth/cred/cred.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ |
Changes to auth/impl/impl.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ |
Changes to auth/policy/anon.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ |
Changes to auth/policy/box.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ |
Changes to auth/policy/default.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ |
Changes to auth/policy/owner.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ |
Changes to auth/policy/policy.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ |
Changes to auth/policy/policy_test.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ |
Changes to auth/policy/readonly.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ |
Changes to box/box.go.
1 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | - + - - | //----------------------------------------------------------------------------- |
︙ | |||
89 90 91 92 93 94 95 96 97 98 99 | 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 | + + + + + + + + + + + + + + + + + + - + | type ManagedBoxStats struct { // ReadOnly indicates that the content of a box cannot change. ReadOnly bool // Zettel is the number of zettel managed by the box. Zettel int } // StartState enumerates the possible states of starting and stopping a box. // // StartStateStopped -> StartStateStarting -> StartStateStarted -> StateStateStopping -> StartStateStopped. // // Other transitions are also possible. type StartState uint8 // Constant values of StartState const ( StartStateStopped StartState = iota StartStateStarting StartStateStarted StartStateStopping ) // StartStopper performs simple lifecycle management. type StartStopper interface { // State the current status of the box. State() StartState // Start the box. Now all other functions of the box are allowed. |
︙ | |||
179 180 181 182 183 184 185 186 187 188 189 190 191 | 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 | + - + | // UpdateReason gives an indication, why the ObserverFunc was called. type UpdateReason uint8 // Values for Reason const ( _ UpdateReason = iota OnReady // Box is started and fully operational OnReload // Box was reloaded OnZettel // Something with a zettel happened ) // UpdateInfo contains all the data about a changed zettel. type UpdateInfo struct { |
︙ | |||
293 294 295 296 297 298 299 | 310 311 312 313 314 315 316 | - - - - - - - - - - - - - - - - - - - - - - - - - | // ErrCapacity is returned if a box has reached its capacity. var ErrCapacity = errors.New("capacity exceeded") // ErrInvalidID is returned if the zettel id is not appropriate for the box operation. type ErrInvalidID struct{ Zid id.Zid } func (err *ErrInvalidID) Error() string { return "invalid Zettel id: " + err.Zid.String() } |
Changes to box/compbox/compbox.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ |
Changes to box/compbox/config.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ |
Changes to box/compbox/keys.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ |
Changes to box/compbox/log.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ |
Changes to box/compbox/manager.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ |
Changes to box/compbox/parser.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ |
Changes to box/compbox/version.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ |
Changes to box/constbox/base.css.
︙ | |||
140 141 142 143 144 145 146 147 148 149 150 151 152 153 | 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 | + | input.zs-secondary { float:left } input.zs-upload { padding-left: 1em; padding-right: 1em; } a:not([class]) { text-decoration-skip-ink: auto } a.broken { text-decoration: line-through } a.external::after { content: "➚"; display: inline-block } img { max-width: 100% } img.right { float: right } ol.zs-endnotes { padding-top: .5rem; border-top: 1px solid; } kbd { font-family:monospace } |
︙ |
Changes to box/constbox/constbox.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ |
Changes to box/constbox/context.mustache.
|
Changes to box/constbox/delete.mustache.
︙ | |||
36 37 38 39 40 41 42 | 36 37 38 39 40 41 42 | - | <dt>{{Key}}:</dt><dd>{{Value}}</dd> {{/MetaPairs}} </dl> <form method="POST"> <input class="zs-primary" type="submit" value="Delete"> </form> </article> |
Changes to box/constbox/license.txt.
| 1 2 3 4 5 6 7 8 | - + |
|
︙ |
Changes to box/constbox/listzettel.mustache.
|
Changes to box/constbox/zettel.mustache.
1 2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | - + - + | <article> <header> |
︙ |
Changes to box/dirbox/dirbox.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ | |||
124 125 126 127 128 129 130 131 132 133 134 135 136 137 | 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 | + + + + + + + + + + + + + + + + + + | fCmds []chan fileCmd mxCmds sync.RWMutex } func (dp *dirBox) Location() string { return dp.location } func (dp *dirBox) State() box.StartState { if ds := dp.dirSrv; ds != nil { switch ds.State() { case notify.DsCreated: return box.StartStateStopped case notify.DsStarting: return box.StartStateStarting case notify.DsWorking: return box.StartStateStarted case notify.DsMissing: return box.StartStateStarted case notify.DsStopping: return box.StartStateStopping } } return box.StartStateStopped } func (dp *dirBox) Start(context.Context) error { dp.mxCmds.Lock() defer dp.mxCmds.Unlock() dp.fCmds = make([]chan fileCmd, 0, dp.fSrvs) for i := uint32(0); i < dp.fSrvs; i++ { cc := make(chan fileCmd) |
︙ | |||
149 150 151 152 153 154 155 156 157 158 159 160 161 162 | 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 | + | } if err != nil { dp.log.Fatal().Err(err).Msg("Unable to create directory supervisor") dp.stopFileServices() return err } dp.dirSrv = notify.NewDirService( dp, dp.log.Clone().Str("sub", "dirsrv").Child(), notifier, dp.cdata.Notify, ) dp.dirSrv.Start() return nil } |
︙ |
Changes to box/dirbox/dirbox_test.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ |
Changes to box/dirbox/service.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ |
Changes to box/filebox/filebox.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ |
Changes to box/filebox/zipbox.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ | |||
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | + + + + + + + + + + + + + + + + + + - + + | func (zb *zipBox) Location() string { if strings.HasPrefix(zb.name, "/") { return "file://" + zb.name } return "file:" + zb.name } func (zb *zipBox) State() box.StartState { if ds := zb.dirSrv; ds != nil { switch ds.State() { case notify.DsCreated: return box.StartStateStopped case notify.DsStarting: return box.StartStateStarting case notify.DsWorking: return box.StartStateStarted case notify.DsMissing: return box.StartStateStarted case notify.DsStopping: return box.StartStateStopping } } return box.StartStateStopped } func (zb *zipBox) Start(context.Context) error { reader, err := zip.OpenReader(zb.name) if err != nil { return err } reader.Close() zipNotifier := notify.NewSimpleZipNotifier(zb.log, zb.name) |
︙ |
Changes to box/helper.go.
1 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | - + + + | //----------------------------------------------------------------------------- |
︙ | |||
30 31 32 33 34 35 36 | 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | + + + + + + + + + + + + + + + + + + + + + + + + + | } // TODO: do not wait here unconditionally. time.Sleep(100 * time.Millisecond) withSeconds = true } return id.Invalid, ErrConflict } // GetQueryBool is a helper function to extract bool values from a box URI. func GetQueryBool(u *url.URL, key string) bool { _, ok := u.Query()[key] return ok } // GetQueryInt is a helper function to extract int values of a specified range from a box URI. func GetQueryInt(u *url.URL, key string, min, def, max int) int { sVal := u.Query().Get(key) if sVal == "" { return def } iVal, err := strconv.Atoi(sVal) if err != nil { return def } if iVal < min { return min } if iVal > max { return max } return iVal } |
Changes to box/manager/anteroom.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ |
Changes to box/manager/anteroom_test.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ |
Changes to box/manager/box.go.
1 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 | - + - + - + - + - + - + - + - - + - + + - - + - + + - - + - + + - - + - + + - - + - + + - - + - + + - - + - + + | //----------------------------------------------------------------------------- |
︙ | |||
195 196 197 198 199 200 201 | 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 | - + - + - - + - - - + - + + - - + - + + - - + - + + - - + - + + | } } } result := make([]*meta.Meta, 0, len(selected)) for _, m := range selected { result = append(result, m) } |
Changes to box/manager/collect.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ |
Changes to box/manager/enrich.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ |
Changes to box/manager/indexer.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ | |||
81 82 83 84 85 86 87 | 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 | - + - | } }() timerDuration := 15 * time.Second timer := time.NewTimer(timerDuration) ctx := box.NoEnrichContext(context.Background()) for { |
︙ |
Changes to box/manager/manager.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ | |||
81 82 83 84 85 86 87 | 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 | - - + + + + + + + + + + + + + + + + | // GetSchemes returns all registered scheme, ordered by scheme string. func GetSchemes() []string { return maps.Keys(registry) } // Manager is a coordinating box. type Manager struct { mgrLog *logger.Logger |
︙ | |||
191 192 193 194 195 196 197 198 199 200 201 | 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 | + + - + + | reason, zid := ci.Reason, ci.Zid mgr.mgrLog.Debug().Uint("reason", uint64(reason)).Zid(zid).Msg("notifier") if ignoreUpdate(cache, now, reason, zid) { mgr.mgrLog.Trace().Uint("reason", uint64(reason)).Zid(zid).Msg("notifier ignored") continue } mgr.idxEnqueue(reason, zid) if ci.Box == nil { ci.Box = mgr } if mgr.State() == box.StartStateStarted { |
︙ | |||
224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 | 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 | + + + | reason: reason, } return false } func (mgr *Manager) idxEnqueue(reason box.UpdateReason, zid id.Zid) { switch reason { case box.OnReady: return case box.OnReload: mgr.idxAr.Reset() case box.OnZettel: mgr.idxAr.EnqueueZettel(zid) default: mgr.mgrLog.Warn().Uint("reason", uint64(reason)).Zid(zid).Msg("Unknown notification reason") return } select { case mgr.idxReady <- struct{}{}: default: } } |
︙ | |||
250 251 252 253 254 255 256 | 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 | - - + + + + - + + + + + + + + + + - - - - - + + + + + + + + + + - + + - + - - + - + + | } } // Start the box. Now all other functions of the box are allowed. // Starting an already started box is not allowed. func (mgr *Manager) Start(ctx context.Context) error { mgr.mgrMx.Lock() |
︙ |
Changes to box/manager/memstore/memstore.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ |
Changes to box/manager/memstore/refs.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ |
Changes to box/manager/memstore/refs_test.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ |
Changes to box/manager/store/store.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ |
Changes to box/manager/store/wordset.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ |
Changes to box/manager/store/wordset_test.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ |
Changes to box/manager/store/zettel.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ |
Changes to box/membox/membox.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ | |||
50 51 52 53 54 55 56 | 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | - + + + + + + + + + + | mx sync.RWMutex // Protects the following fields zettel map[id.Zid]domain.Zettel curBytes int } func (mb *memBox) notifyChanged(zid id.Zid) { if chci := mb.cdata.Notify; chci != nil { |
︙ |
Changes to box/notify/directory.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ | |||
25 26 27 28 29 30 31 | 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 | - + - + - - - - - + + + + + + - + - + + - + + + + + + + + + - + - + | "zettelstore.de/z/parser" "zettelstore.de/z/query" "zettelstore.de/z/strfun" ) type entrySet map[id.Zid]*DirEntry |
︙ | |||
235 236 237 238 239 240 241 | 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 | - + - + - + - + | ds.mx.RLock() state := ds.state ds.mx.RUnlock() if msg := ds.log.Trace(); msg.Enabled() { msg.Uint("state", uint64(state)).Str("op", ev.Op.String()).Str("name", ev.Name).Msg("notifyEvent") } |
︙ | |||
314 315 316 317 318 319 320 | 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 | - + | } } func (ds *DirService) onDestroyDirectory() { ds.mx.Lock() entries := ds.entries ds.entries = nil |
︙ | |||
591 592 593 594 595 596 597 | 601 602 603 604 605 606 607 608 609 610 | - + | } return newExt < oldExt } func (ds *DirService) notifyChange(zid id.Zid) { if chci := ds.infos; chci != nil { ds.log.Trace().Zid(zid).Msg("notifyChange") |
Changes to box/notify/directory_test.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ |
Changes to box/notify/entry.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ |
Changes to box/notify/fsdir.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ | |||
90 91 92 93 94 95 96 97 98 99 100 101 102 103 | 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 | + | func (fsdn *fsdirNotifier) eventLoop() { defer fsdn.base.Close() defer close(fsdn.events) defer close(fsdn.refresh) if !listDirElements(fsdn.log, fsdn.fetcher, fsdn.events, fsdn.done) { return } for fsdn.readAndProcessEvent() { } } func (fsdn *fsdirNotifier) readAndProcessEvent() bool { select { case <-fsdn.done: |
︙ |
Changes to box/notify/helper.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ |
Changes to box/notify/notify.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ |
Changes to box/notify/simpledir.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ |
Changes to cmd/cmd_file.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ |
Changes to cmd/cmd_password.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ |
Changes to cmd/cmd_run.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ | |||
87 88 89 90 91 92 93 | 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 | - + - - + - - + - | const assetPrefix = "/assets/" webSrv.Handle(assetPrefix, http.StripPrefix(assetPrefix, http.FileServer(http.Dir(assetDir)))) webSrv.Handle("/favicon.ico", wui.MakeFaviconHandler(assetDir)) } // Web user interface if !authManager.IsReadonly() { |
︙ |
Changes to cmd/command.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ |
Changes to cmd/main.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ |
Changes to cmd/register.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ | |||
17 18 19 20 21 22 23 24 | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | + - | _ "zettelstore.de/z/box/constbox" // Allow to use global internal box. _ "zettelstore.de/z/box/dirbox" // Allow to use directory box. _ "zettelstore.de/z/box/filebox" // Allow to use file box. _ "zettelstore.de/z/box/membox" // Allow to use in-memory box. _ "zettelstore.de/z/encoder/htmlenc" // Allow to use HTML encoder. _ "zettelstore.de/z/encoder/mdenc" // Allow to use markdown encoder. _ "zettelstore.de/z/encoder/sexprenc" // Allow to use sexpr encoder. _ "zettelstore.de/z/encoder/shtmlenc" // Allow to use SHTML encoder. _ "zettelstore.de/z/encoder/textenc" // Allow to use text encoder. |
Changes to cmd/zettelstore/main.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ |
Changes to collect/collect.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ |
Changes to collect/collect_test.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ |
Changes to collect/order.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ |
Changes to collect/split.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ |
Changes to config/config.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ | |||
18 19 20 21 22 23 24 | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | - | ) // Key values that are supported by Config.Get const ( KeyFooterZettel = "footer-zettel" KeyHomeZettel = "home-zettel" // api.KeyLang |
︙ |
Changes to docs/development/20210916193200.zettel.
1 2 3 4 5 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | - + + | id: 20210916193200 title: Required Software role: zettel syntax: zmk created: 20210916193200 |
Changes to docs/manual/00000000000100.zettel.
1 2 3 4 5 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | - + | id: 00000000000100 title: Zettelstore Runtime Configuration role: configuration syntax: none created: 00010101000000 |
Changes to docs/manual/00001004020000.zettel.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | - + | id: 00001004020000 title: Configure the running Zettelstore role: manual tags: #configuration #manual #zettelstore syntax: zmk created: 20210126175322 |
︙ | |||
47 48 49 50 51 52 53 | 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | - - - - - - | Default: ""en"". This value is used as a default value, if it is not set in an user's zettel or in a zettel. It is also used to specify the language for all non-zettel content, e.g. lists or search results. Use values according to the language definition of [[RFC-5646|https://tools.ietf.org/html/rfc5646]]. |
︙ |
Changes to docs/manual/00001004020200.zettel.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | - + - | id: 00001004020200 title: Runtime configuration data that may be user specific or zettel specific role: manual tags: #configuration #manual #zettelstore syntax: zmk created: 20221205155521 |
Changes to docs/manual/00001004051200.zettel.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | - + + - | id: 00001004051200 title: The ''file'' sub-command role: manual tags: #command #configuration #manual #zettelstore syntax: zmk created: 20210126175322 |
Changes to docs/manual/00001006020000.zettel.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | - + | id: 00001006020000 title: Supported Metadata Keys role: manual tags: #manual #meta #reference #zettel #zettelstore syntax: zmk created: 20210126175322 |
︙ | |||
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 | + + + + + + - - | Otherwise, if the zettel identifier contains a valid timestamp, the identifier is used. In all other cases, this property is not set. It can be used for [[sorting|00001007700000]] zettel based on their publication date. It is a computed value. There is no need to set it via Zettelstore. ; [!query|''query''] : Stores the [[query|00001007031140]] that was used to create the zettel. This is for future reference. ; [!read-only|''read-only''] : Marks a zettel as read-only. The interpretation of [[supported values|00001006020400]] for this key depends, whether authentication is [[enabled|00001010040100]] or not. ; [!role|''role''] : Defines the role of the zettel. Can be used for selecting zettel. See [[supported zettel roles|00001006020100]]. If not given, it is ignored. ; [!successors|''successors''] : Is a property that contains identifier of all zettel that reference this zettel through the [[''predecessor''|#predecessor]] value. Therefore, it references all zettel that contain a new version of the content and/or metadata. In contrast to [[''folge''|#folge]], these are references because of technical reasons, not because of content-related reasons. In most cases, zettel referencing the current zettel should be updated to reference a successor zettel. The [[query reference|00001007040310]] [[query:backward? successors?]] lists all such zettel. ; [!summary|''summary''] : Summarizes the content of the zettel. You may use all [[inline-structued elements|00001007040000]] of Zettelmarkup. ; [!syntax|''syntax''] : Specifies the syntax that should be used for interpreting the zettel. The zettel about [[other markup languages|00001008000000]] defines supported values. If it is not given, it defaults to ''plain''. ; [!tags|''tags''] : Contains a space separated list of tags to describe the zettel further. Each Tag must begin with the number sign character (""''#''"", U+0023). ; [!title|''title''] : Specifies the title of the zettel. If not given, the value of [[''id''|#id]] will be used. |
︙ |
Changes to docs/manual/00001007702000.zettel.
1 2 3 4 5 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | + - + | id: 00001007702000 title: Search term role: manual tags: #manual #search #zettelstore syntax: zmk created: 20220805150154 |
︙ | |||
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | + + + + + + + - + - + | Is true, if zettel metadata contains / does not contain the given key. * The string ''OR'' signals that following search literals may occur alternatively in the result. Since search literals may be negated, it is possible to form any boolean search expression. Any search expression will be in a [[disjunctive normal form|https://en.wikipedia.org/wiki/Disjunctive_normal_form]]. It has no effect on the following search terms initiated with a special uppercase word. * The string ''PICK'', followed by a non-empty sequence of spaces and a number greater zero (called ""N""). This will pick randomly N elements of the result list. A zero value of N will produce the same result as if nothing was specified. If specified multiple times, the lower value takes precedence. Example: ''PICK 5 PICK 3'' will be interpreted as ''PICK 3''. * The string ''ORDER'', followed by a non-empty sequence of spaces and the name of a metadata key, will specify an ordering of the result list. If you include the string ''REVERSE'' after ''ORDER'' but before the metadata key, the ordering will be reversed. Example: ''ORDER published'' will order the resulting list based on the publishing data, while ''ORDER REVERSED published'' will return a reversed result order. An explicit order field will take precedence over the random order described below. If no random order is effective, a ``ORDER REVERSE id`` will be added. This makes the sort stable. Example: ``ORDER created`` will be interpreted as ``ORDER created ORDER REVERSE id``. Any ordering by zettel identifier will make following order terms to be ignored. Example: ``ORDER id ORDER created`` will be interpreted as ``ORDER id``. * The string ''RANDOM'' will provide a random order of the resulting list. Currently, only the first term specifying the order of the resulting list will be used. Other ordering terms will be ignored. |
︙ | |||
72 73 74 75 76 77 78 | 80 81 82 83 84 85 86 87 88 89 90 91 92 | - + + + + + + | You may have noted that the specifications of first two items overlap somehow. This is resolved by the following rule: * A search term containing no [[search operator character|00001007705000]] is treated as a full-text search. * The first search operator character found in a search term divides the term into two pieces. If the first piece, from the beginning of the search term to the search operator character, is syntactically a metadata key, the search term is treated as a metadata-based search. * Otherwise, the search term is treated as a full-text search. |
Changes to docs/manual/00001007780000.zettel.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | - + + | id: 00001007780000 title: Formal syntax of query expressions role: manual tags: #manual #reference #search #zettelstore syntax: zmk created: 20220810144539 |
︙ |
Changes to docs/manual/00001007790000.zettel.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | - + - + | id: 00001007790000 title: Useful query expressions role: manual tags: #example #manual #search #zettelstore syntax: zmk created: 20220810144539 |
Changes to docs/manual/00001012051400.zettel.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | - + | id: 00001012051400 title: API: Query the list of all zettel role: manual tags: #api #manual #zettelstore syntax: zmk created: 20220912111111 |
︙ | |||
43 44 45 46 47 48 49 | 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | - + | Additionally, the JSON object contains the keys ''"query"'' and ''"human"'' with a string value. Both will contain a textual description of the underlying query if you select only some zettel with a [[query expression|00001007700000]]. Without a selection, the values are the empty string. ''"query"'' returns the normalized query expression itself, while ''"human"'' is the normalized query expression to be read by humans. An implicit precondition is that the zettel must contain the given metadata key. |
︙ |
Changes to docs/manual/00001012053500.zettel.
︙ | |||
27 28 29 30 31 32 33 | 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | - + | <meta name="zs-title" content="API: Retrieve evaluated metadata and content of an existing zettel in various encodings"> <meta name="zs-role" content="manual"> <meta name="zs-tags" content="#api #manual #zettelstore"> <meta name="zs-syntax" content="zmk"> <meta name="zs-back" content="00001006000000 00001012000000 00001012053600"> <meta name="zs-backward" content="00001006000000 00001012000000 00001012053600 00001012920000"> <meta name="zs-box-number" content="1"> |
︙ |
Changes to docs/manual/00001012920500.zettel.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | - + + - | id: 00001012920500 title: Encodings available via the [[API|00001012000000]] role: manual tags: #api #manual #reference #zettelstore syntax: zmk created: 20210126175322 |
Deleted docs/manual/00001012920503.zettel.
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
Changes to docs/manual/00001012920516.zettel.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | - + - - + - + + | id: 00001012920516 title: Sexpr Encoding role: manual tags: #api #manual #reference #zettelstore syntax: zmk created: 20220422181104 |
︙ |
Added docs/manual/00001012920525.zettel.
|
Deleted docs/manual/00001012920582.zettel.
| - - - - - - - - - - - - - - - - |
|
Deleted docs/manual/00001012920584.zettel.
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
Deleted docs/manual/00001012920588.zettel.
| - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
Changes to domain/content.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ |
Changes to domain/content_test.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ |
Changes to domain/id/id.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ |
Changes to domain/id/id_test.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ |
Changes to domain/id/set.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ |
Changes to domain/id/set_test.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ | |||
131 132 133 134 135 136 137 | 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 | - - - - - - + + + + + + | got := newS1.Sorted() if !got.Equal(tc.exp) { t.Errorf("%d: %v.Remove(%v) should be %v, but got %v", i, sl1, sl2, tc.exp, got) } } } |
Changes to domain/id/slice.go.
1 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | - + - + | //----------------------------------------------------------------------------- |
︙ | |||
52 53 54 55 56 57 58 | 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | - + - + - + - + | return true } func (zs Slice) String() string { if len(zs) == 0 { return "" } |
Changes to domain/id/slice_test.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ |
Changes to domain/meta/collection.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ |
Changes to domain/meta/meta.go.
1 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | - + - | //----------------------------------------------------------------------------- |
︙ | |||
125 126 127 128 129 130 131 | 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 | - + | } return result } // Supported keys. func init() { registerKey(api.KeyID, TypeID, usageComputed, "") |
︙ | |||
401 402 403 404 405 406 407 | 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 | - + - - + + - - + + | // RemoveNonGraphic changes the given string not to include non-graphical characters. // It is needed to sanitize meta data. func RemoveNonGraphic(s string) string { if s == "" { return "" } pos := 0 |
Changes to domain/meta/meta_test.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ |
Changes to domain/meta/parse.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ |
Changes to domain/meta/parse_test.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ |
Changes to domain/meta/type.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ |
Changes to domain/meta/type_test.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ |
Changes to domain/meta/values.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ |
Changes to domain/meta/write.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ |
Changes to domain/meta/write_test.go.
1 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | - + - | //----------------------------------------------------------------------------- |
︙ | |||
33 34 35 36 37 38 39 | 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | - - - + + + | if syntax != "" { m.Set(api.KeySyntax, syntax) } return m } func assertWriteMeta(t *testing.T, m *meta.Meta, expected string) { t.Helper() |
︙ |
Changes to domain/zettel.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ |
Changes to encoder/encoder.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ |
Changes to encoder/encoder_blob_test.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ | |||
36 37 38 39 40 41 42 | 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | - - + + | 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x3a, 0x7e, 0x9b, 0x55, 0x00, 0x00, 0x00, 0x0a, 0x49, 0x44, 0x41, 0x54, 0x78, 0x9c, 0x63, 0x62, 0x00, 0x00, 0x00, 0x06, 0x00, 0x03, 0x36, 0x37, 0x7c, 0xa8, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, }, expect: expectMap{ |
︙ |
Changes to encoder/encoder_block_test.go.
1 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 | - + - - + + - - + + - - + + - - + - + + - - + + - - + + - - + + - - + + - - + + + + + + + + + + + + + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + + + + + + + + + + + + - + + - - + + - - + + - - + + + + + + + - + - + + + + + + + - - + + + - - + + - - - - - + + + + + - - + + | //----------------------------------------------------------------------------- |
Changes to encoder/encoder_inline_test.go.
1 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 | - + - - + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + + + + + + + + + + + + - - + + - - + + - + - + - - + + - - + - + + - - + + - - - + + + - - + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + - + + - - + + - - + + - - + + | //----------------------------------------------------------------------------- |
Changes to encoder/encoder_test.go.
1 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | - + - + - + - + - - + | //----------------------------------------------------------------------------- |
︙ | |||
78 79 80 81 82 83 84 | 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 | + + + + + - + | } func checkEncodings(t *testing.T, testNum int, pe parserEncoder, descr string, expected expectMap, zmkDefault string) { for enc, exp := range expected { encdr := encoder.Create(enc) got, err := pe.encode(encdr) if err != nil { prefix := fmt.Sprintf("Test #%d", testNum) if d := descr; d != "" { prefix += "\nReason: " + d } prefix += "\nMode: " + pe.mode() |
︙ | |||
103 104 105 106 107 108 109 | 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 | - + - + - - - - - - + + - + - - + + - + | t.Helper() encdr := encoder.Create(encoderSexpr) exp, err := pe.encode(encdr) if err != nil { t.Error(err) return } |
Changes to encoder/htmlenc/htmlenc.go.
1 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 | - + + - + + + + + - + + + + + + + + + - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - + + - - + + - - + + + + + + + - + - - - - - - + + + + + + + + + + + + + - - + + + + + + + + + + + - - + + + + - - + + + + + + + + - - + + - - + - - - - + - - - + + - - - - + - - - - - - - + + - - - - + | //----------------------------------------------------------------------------- |
Changes to encoder/mdenc/mdenc.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ |
Changes to encoder/sexprenc/sexprenc.go.
1 | 1 2 3 4 5 6 7 8 9 | - + | //----------------------------------------------------------------------------- |
︙ | |||
30 31 32 33 34 35 36 | 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | + - - - + + + - + + - + + - + + - + | type Encoder struct{} var mySE Encoder // WriteZettel writes the encoded zettel to the writer. func (*Encoder) WriteZettel(w io.Writer, zn *ast.ZettelNode, evalMeta encoder.EvalMetaFunc) (int, error) { t := NewTransformer() |
Changes to encoder/sexprenc/transform.go.
1 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 | - + - + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + + + + - + - + - - - - + + + + - - + + - - + - - + - - + - - - + + - - - - - + - + - + - + - + - + - - + - + - - + - - - + - - - + - - - - + - + - - - + + - - - - - - + - - - - + + - - - - + - - - + - - + - - + - - - - - + - + - - - + - - - + - - - - + + + + - + - - - - - - - - - - - - - - - - + - + - - - + + + - + - - - - - - - - - + + + - - + + - + - + + - - - + + + + + + - - - + + + - - + + - - - - - + - + - + - - - - - + - - - - - - - + - - - - + + + + + + + - + - + - - - - - - - + - - - - - - - - - - - - + - - - + + + + - - - - - + + + + + + + - - - - - + + - - - - - - - + + + + + + + + + - - - - - - + + + + + - - + + + + + + - - + + - + - + - - - - + - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - + + - + - + - - + + - + - + - + - + - + - - - + - - - - - - - - - - - - - + + + + + - - - + + - - + - - - - - - - - - - - - - - + - + - - - + + + - + - + - + - - + - + - + - + - + - + - - - + + + - + - + | //----------------------------------------------------------------------------- |
Added encoder/shtmlenc/shtmlenc.go.